Documentation
¶
Overview ¶
Package passwordauth hashes and verifies local account passwords with argon2id. Hashes are stored in the PHC string format so they stay self-describing: a hash written with today's cost parameters still verifies after the defaults below are raised.
Index ¶
Constants ¶
View Source
const ( MinPasswordLength = 8 // MaxPasswordLength bounds the work an unauthenticated caller can ask for. MaxPasswordLength = 256 )
Variables ¶
View Source
var ( ErrPasswordTooShort = fmt.Errorf("password must be at least %d characters", MinPasswordLength) ErrPasswordTooLong = fmt.Errorf("password must be at most %d characters", MaxPasswordLength) ErrInvalidHash = errors.New("password hash is not a supported argon2id encoding") )
Functions ¶
func ValidatePassword ¶
ValidatePassword reports whether a candidate secret is acceptable to store.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.