Versions in this module Expand all Collapse all v0 v0.56.0 Sep 2, 2026 GO-2026-5932 GO-2026-5932: The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues Changes in this version + const DefaultCost + const MaxCost + const MinCost + var ErrHashTooShort = errors.New("crypto/bcrypt: hashedSecret too short to be a bcrypted password") + var ErrMismatchedHashAndPassword = errors.New("crypto/bcrypt: hashedPassword is not the hash of the given password") + var ErrPasswordTooLong = errors.New("bcrypt: password length exceeds 72 bytes") + func CompareHashAndPassword(hashedPassword, password []byte) error + func Cost(hashedPassword []byte) (int, error) + func GenerateFromPassword(password []byte, cost int) ([]byte, error) + type HashVersionTooNewError byte + func (hv HashVersionTooNewError) Error() string + type InvalidCostError int + func (ic InvalidCostError) Error() string + type InvalidHashPrefixError byte + func (ih InvalidHashPrefixError) Error() string