Documentation
¶
Overview ¶
Package hasher provides a unified interface for various hash algorithms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashReader ¶
HashReader computes hashes from an io.Reader using multiple hashers simultaneously. This reads the data only once, computing all hashes in parallel.
Types ¶
type HashResult ¶
HashResult holds the hash result for a single algorithm.
type Hasher ¶
type Hasher interface {
// Name returns the algorithm name (e.g., "md5", "sha256")
Name() string
// New creates a new hash.Hash instance
New() hash.Hash
// OutputSize returns the size of the hash output in bytes
OutputSize() int
// IsBase64 returns true if the hash should be encoded as base64 (e.g., quickxor)
IsBase64() bool
}
Hasher represents a hash algorithm that can be used to compute checksums.
Click to show internal directories.
Click to hide internal directories.