Documentation ¶
Overview ¶
Package hash provides multiple hash functions
Package hash provides multiple hash functions ¶
Package hash provides multiple hash functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("The encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("Incompatible version of argon2") )
View Source
var DefaultArgon2Config = Argon2Config{ Memory: 64 * constants.Argon2Kibibyte, Iterations: 5, Parallelism: uint8(runtime.NumCPU() / 4), SaltLength: 16, KeyLength: 32, }
DefaultArgon2Config is the default config when using NewArgon2
Functions ¶
Types ¶
type Argon2 ¶
type Argon2 struct {
// contains filtered or unexported fields
}
func NewArgon2 ¶
func NewArgon2() Argon2
NewArgon2 returns a new Argon2 hasher with the default config
func NewArgon2WithConfig ¶
func NewArgon2WithConfig(c Argon2Config) Argon2
NewArgon2WithConfig returns a new Argon2 hasher with a custom config
type Argon2Config ¶
Click to show internal directories.
Click to hide internal directories.