Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PasswordHasher ¶
type PasswordHasher interface { // Hash salts and hashes the given password returning the resulting hash Hash(password string) (string, error) // Compare returns true if the given password corresponds to // the given hash, otherwise returns false Compare(password, hash string) bool }
PasswordHasher defines the interface of a password hasher
func NewBcryptPasswordHasher ¶
func NewBcryptPasswordHasher() PasswordHasher
NewBcryptPasswordHasher creates a new bcrypt based password hasher instance
Click to show internal directories.
Click to hide internal directories.