Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMismatchedHashAndPassword the error returned from CompareHashAndPassword when a password and hash do // not match. ErrMismatchedHashAndPassword = errors.New("hashedPassword is not the hash of the given password") // ErrBadAlgorithm the error returned from newFromHash when a hash not include necessary prefix ErrBadAlgorithm = errors.New("bad algorithm") )
Functions ¶
func CompareHashAndPassword ¶
func ComparePasswords ¶
func GenerateFromPassword ¶
GenerateFromPassword returns the sha1 hash of the password at the given salt.
func HashAndSalt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.