Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorNotSupported is returned when the hash is unsupported ErrorNotSupported errorNotSupported // ErrorInvalidFormat is returned when the hash format is invalid ErrorInvalidFormat errorInvalidFormat // ErrorKeyInvalid is returned when the hash key config is invalid ErrorKeyInvalid errorKeyInvalid )
Functions ¶
Types ¶
type AlgsMap ¶
type AlgsMap struct {
// contains filtered or unexported fields
}
func NewAlgsMap ¶
func NewAlgsMap() *AlgsMap
type Hasher ¶
type Hasher interface { ID() string Hash(msg []byte) (string, error) Verify(msg []byte, msghash string) (bool, error) }
Hasher is a hash interface
type Verifier ¶
type Verifier interface { Register(hasher Hasher) Verify(msg []byte, msghash string) (bool, error) }
Verifier verifies hashes
type VerifierMap ¶
type VerifierMap struct {
// contains filtered or unexported fields
}
func NewVerifierMap ¶
func NewVerifierMap() *VerifierMap
func (*VerifierMap) Register ¶
func (v *VerifierMap) Register(hasher Hasher)
Register registers a Hasher
Click to show internal directories.
Click to hide internal directories.