Documentation ¶
Overview ¶
Package hasher provides a generic interface and base implementation for hashing data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blake2b ¶
type Blake2b struct {
// contains filtered or unexported fields
}
Blake2b implements the Hasher interface using Blake2b algorithm.
type Hasher ¶
type Hasher interface { // Hash takes input data and returns the hashed result. // It returns an error if the input data is too large. // The function is idempotent - calling it multiple times with the same input // will produce the same output, assuming the underlying hash function is deterministic. Hash(data []byte) ([]byte, error) }
Hasher defines a generic interface for hashing data. Implementations of this interface may choose to be safe for concurrent use, but it is not a requirement. Users should check the documentation of specific implementations for concurrent safety guarantees.
type InputTooLargeError ¶
type InputTooLargeError struct {
// contains filtered or unexported fields
}
InputTooLargeError is returned when the input data exceeds the maximum allowed size.
func (*InputTooLargeError) Error ¶
func (e *InputTooLargeError) Error() string
Click to show internal directories.
Click to hide internal directories.