Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultIterations = 10000
)
Variables ¶
This section is empty.
Functions ¶
func WithHasFunc ¶
WithHasFunc configure the ken hash func for Encoder, default value is sha256.New
func WithIterations ¶
WithIterations configure the iterations for Encoder, default value is 10000
func WithKeyLen ¶
WithKeyLen configure the key 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 Iterations int KeyLen int HashFunc func() hash.Hash // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.