Documentation
¶
Index ¶
- type PasswordHasher
- func GetPasswordHasher(passwordType string) (PasswordHasher, error)
- func NewArgon2IDHasher(memory uint32, iterations uint32, parallelism uint8, saltLength uint32, ...) PasswordHasher
- func NewBcryptHasher(costs int) PasswordHasher
- func NewPBKDF2Hasher(digest func() hash.Hash, iterations int, keyLen int) PasswordHasher
- func NewScryptHasher(costFactor, blockSize, parallelization, keyLength int) PasswordHasher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasswordHasher ¶
type PasswordHasher interface {
HashPassword(password string, salt string) (string, error)
ComparePassword(password string, hashedPassword string, salt string) (bool, error)
}
func GetPasswordHasher ¶
func GetPasswordHasher(passwordType string) (PasswordHasher, error)
func NewArgon2IDHasher ¶
func NewBcryptHasher ¶
func NewBcryptHasher(costs int) PasswordHasher
func NewPBKDF2Hasher ¶
func NewPBKDF2Hasher(digest func() hash.Hash, iterations int, keyLen int) PasswordHasher
func NewScryptHasher ¶
func NewScryptHasher(costFactor, blockSize, parallelization, keyLength int) PasswordHasher
Click to show internal directories.
Click to hide internal directories.