Documentation
¶
Overview ¶
Package argon2 contains the Argon2id hasher implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argon2idHasher ¶
type Argon2idHasher struct {
Memory uint32
Iterations uint32
Parallelism uint8
SaltLength uint32
KeyLength uint32
}
Argon2idHasher wraps parameterized Argon2id hashing operations.
func Default ¶
func Default() *Argon2idHasher
Default returns an Argon2idHasher configured with library defaults.
func (*Argon2idHasher) Hash ¶
func (a *Argon2idHasher) Hash(password []byte) (string, error)
Hash derives an Argon2id key and returns the PHC string.
func (*Argon2idHasher) ID ¶
func (a *Argon2idHasher) ID() string
ID reports the PHC algorithm identifier.
func (*Argon2idHasher) NeedsRehash ¶
func (a *Argon2idHasher) NeedsRehash(encoded string) (bool, error)
NeedsRehash reports whether the encoded parameters diverge from the current configuration.
Click to show internal directories.
Click to hide internal directories.