Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + const DefaultHashAlgorithmName + var RecommendedHashAlgorithms = []string + func ConfigHashAlgorithm(algorithm string) string + func MustRegister(name string, newFn func(config string) T) + func Register(name string, newFn func(config string) T) error + type Argon2Hasher struct + func NewArgon2Hasher(config string) *Argon2Hasher + func (hasher *Argon2Hasher) HashWithSaltBytes(password string, salt []byte) string + type BcryptHasher struct + func NewBcryptHasher(config string) *BcryptHasher + func (hasher *BcryptHasher) HashWithSaltBytes(password string, salt []byte) string + func (hasher *BcryptHasher) VerifyPassword(password, hashedPassword, salt string) bool + type DummyHasher struct + func NewDummyHasher(_ string) *DummyHasher + func (hasher *DummyHasher) HashWithSaltBytes(password string, salt []byte) string + type PBKDF2Hasher struct + func NewPBKDF2Hasher(config string) *PBKDF2Hasher + func (hasher *PBKDF2Hasher) HashWithSaltBytes(password string, salt []byte) string + type PasswordHashAlgorithm struct + Specification string + var DefaultHashAlgorithm *PasswordHashAlgorithm + func Parse(algorithmSpec string) *PasswordHashAlgorithm + func SetDefaultPasswordHashAlgorithm(algorithmName string) (string, *PasswordHashAlgorithm) + func (algorithm *PasswordHashAlgorithm) Hash(password, salt string) (string, error) + func (algorithm *PasswordHashAlgorithm) VerifyPassword(providedPassword, hashedPassword, salt string) bool + type PasswordHasher interface + Hash func(password, salt string) (string, error) + type PasswordSaltHasher interface + HashWithSaltBytes func(password string, saltBytes []byte) string + type PasswordVerifier interface + VerifyPassword func(providedPassword, hashedPassword, salt string) bool + type ScryptHasher struct + func NewScryptHasher(config string) *ScryptHasher + func (hasher *ScryptHasher) HashWithSaltBytes(password string, salt []byte) string