Versions in this module Expand all Collapse all v0 v0.2.0 Jul 30, 2022 Changes in this version + var ErrBase64Decode = errors.New("passwd: base64 decoding failed") + var ErrGenerateSalt = errors.New("passwd: generate salt failed") + var ErrHashInvalid = errors.New("passwd: hash is invalid") + var ErrPasswordInvalid = errors.New("passwd: password is invalid") + var ErrPasswordRequired = errors.New("passwd: password is required") + var ErrUnknownHashFunction = errors.New("passwd: unknown password hashing function identifier") + func Compare(phc string, password []byte) (bool, error) + func ConstantTimeCompare(s1, s2 string) bool + func Encrypt(password []byte) (string, error) + type Argon2id struct + func New(opts ...Option) Argon2id + func (a *Argon2id) Compare(phc string, password []byte) (bool, error) + func (a *Argon2id) Encrypt(password []byte) (string, error) + type Option func(*Argon2id) + func KeyLen(k uint32) Option + func Memory(m uint32) Option + func Parallelism(p uint8) Option + func SaltLen(s uint32) Option + func Time(t uint32) Option v0.1.0 Jun 12, 2021