Documentation
¶
Overview ¶
Package interfaces implements the functions, types, and interfaces for the module.
Package interfaces implements the functions, types, and interfaces for the module.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmResolver ¶ added in v0.3.18
func (AlgorithmResolver) ResolveType ¶ added in v0.3.18
type ConfigValidator ¶
type ConfigValidator interface {
// Validate validates the configuration
Validate(*types.Config) error
}
ConfigValidator defines the interface for configuration validation
type Cryptographic ¶
type Cryptographic interface {
Type() types.Type
// Hash generates a hash for the given password
Hash(password string) (*types.HashParts, error)
// HashWithSalt generates a hash for the given password with the specified salt
HashWithSalt(password string, salt []byte) (*types.HashParts, error)
// Verify checks if the given hashed password matches the plaintext password
Verify(parts *types.HashParts, oldPassword string) error
}
Cryptographic defines the interface for cryptographic operations
type Decoder ¶
type Decoder interface {
// Decode decodes a string into hash parts
Decode(encoded string) (*types.HashParts, error)
}
Decoder defines the interface for hash decoding operations
type Encoder ¶
type Encoder interface {
// Encode encodes salt and hash into a string
Encode(parts *types.HashParts) (string, error)
}
Encoder defines the interface for hash encoding operations
type Params ¶ added in v0.3.18
type Params interface {
ConfigValidator
// String returns the string representation of parameters
String() string
// ToMap converts parameters to map[string]string format for encoding.
ToMap() map[string]string
// FromMap parses parameters from map[string]string format.
FromMap(params map[string]string) error
}
Params A common interface for algorithm parameters is defined
type TypeResolver ¶ added in v0.3.18
Click to show internal directories.
Click to hide internal directories.