Documentation
¶
Overview ¶
Package password provides Argon2id password hashing with encoded parameters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultParameters = Parameters{Memory: 19 * 1024, Iterations: 2, Parallelism: 1, KeyLength: 32, SaltLength: 16}
DefaultParameters define package-level implementation state.
View Source
var ErrInvalidHash = errors.New("invalid password hash")
ErrInvalidHash define package-level implementation state.
Functions ¶
Types ¶
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher hashes and verifies passwords with one immutable parameter set.
func (Hasher) NeedsRehash ¶
NeedsRehash performs this package operation.
type Parameters ¶
type Parameters struct {
// Memory store data used by this type.
Memory uint32
// Iterations store data used by this type.
Iterations uint32
// Parallelism store data used by this type.
Parallelism uint8
// KeyLength store data used by this type.
KeyLength uint32
// SaltLength store data used by this type.
SaltLength uint32
}
Parameters defines an implementation type used by this package.
Click to show internal directories.
Click to hide internal directories.