Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHasFunc ¶
WithHasFunc configure the ken hash func for Encoder, default value is sha256.New
func WithHashLen ¶
WithHashLen configure the hash length for Encoder, default value is 32
func WithSalt ¶
WithSalt configure the salt value for Encoder, default automatically generate random strings
func WithSaltLen ¶
WithSaltLen configure the salt length for Encoder, default value is 16
Types ¶
type Encoder ¶
type Encoder struct { SaltLen int // bytes to use as salt (octets) HashFunc func() hash.Hash Info string HashLen int // The length of the generated hash // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.