Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version1 = "v1.0.0" // Original version using hex encoding Version2 = "v2.0.0" // New version using base64 encoding (not backward compatible with v1) )
Version constants
Variables ¶
This section is empty.
Functions ¶
func EncodeParams ¶
EncodeParams encodes a map of parameters into a string. It sorts the keys to ensure a consistent output string.
Types ¶
type Decoder ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 Option ¶
type Option func(*codec)
Option defines configuration options for the codec
func WithVersion ¶
WithVersion sets the version number Use Version1 (v1.0.0) for hex encoding (legacy) Use Version2 (v2.0.0) for base64 encoding (recommended for new hashes) Follows semantic versioning (semver.org)
Click to show internal directories.
Click to hide internal directories.