Documentation ¶
Overview ¶
Password-Hash Interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Register ¶
func Register(name string, ph PasswordHash)
Types ¶
type PasswordHash ¶
type PasswordHash interface { CompareHashAndPassword(hashedPassword, password []byte) error GenerateFromPassword(password []byte, cost int) ([]byte, error) }
func DefaultPasswordHash ¶
func DefaultPasswordHash() PasswordHash
func GetPasswordHash ¶
func GetPasswordHash(name string) (PasswordHash, error)
Click to show internal directories.
Click to hide internal directories.