Versions in this module Expand all Collapse all v1 v1.0.0 Jul 25, 2016 Changes in this version + var ErrInsufficientRandomData = errors.New("scrypt/auth: Not enough random data is available to securely hash passwords") + var ErrInvalidHashFormat = errors.New(...) + var ErrInvalidNValue = errors.New(...) + var ErrInvalidPValue = errors.New("scrypt/auth: p parameter must be between 2^0 and 2^30 inclusive") + var ErrInvalidRPValues = errors.New("scrypt/auth: The r and p parameters must be such that r * p < 2^30") + var ErrInvalidRValue = errors.New("scrypt/auth: r parameter must be between 2^0 and 2^30 inclusive") + var ErrKeyTooShort = errors.New("scrypt/auth: The minimum allowed key length is 32 bytes, or 256 bits") + var ErrMismatchedHashAndPassword = errors.New("scrypt/auth: The supplied password does not match the hashed secret") + var ErrMissingPrefix = errors.New("scrypt/auth: Hashed password is not prefixed with the expected $4s$ sequence") + var ErrSaltTooShort = errors.New("scrypt/auth: The minimum allowed salt length is 8 bytes or 64 bits") + func CompareHashAndPassword(hashedPassword, password []byte) error + func GenerateFromPassword(password []byte, parameters HashConfiguration) ([]byte, error) + type HashConfiguration struct + KeyLen HashParameter + N HashParameter + P HashParameter + R HashParameter + SaltLen HashParameter + func DefaultHashConfiguration() HashConfiguration + func NewHashConfiguration(n, r, p, saltLen, keyLen int) (HashConfiguration, error) + type HashParameter int + const DefaultKeyLen + const DefaultN + const DefaultP + const DefaultR + const DefaultSaltLen + const MaxN + const MaxP + const MaxR + const MinKeyLen + const MinN + const MinP + const MinR + const MinSaltLen