Versions in this module Expand all Collapse all v0 v0.999.0 Aug 8, 2024 v0.2.25 Aug 8, 2024 Changes in this version + const AlgIdentifierVariantD + const AlgIdentifierVariantI + const AlgIdentifierVariantID + const AlgName + const EncodingFmt + const IterationsDefault + const IterationsMax + const IterationsMin + const KeyLengthDefault + const KeyLengthMax + const KeyLengthMin + const MemoryDefault + const MemoryMax + const MemoryMin + const MemoryMinParallelismMultiplier + const MemoryRoundingParallelismMultiplier + const ParallelismDefault + const ParallelismMax + const ParallelismMin + const PasswordInputSizeMax + const SaltLengthMax + const SaltLengthMin + func Decode(encodedDigest string) (digest algorithm.Digest, err error) + func DecodeVariant(v Variant) func(encodedDigest string) (digest algorithm.Digest, err error) + func RegisterDecoder(r algorithm.DecoderRegister) (err error) + func RegisterDecoderArgon2d(r algorithm.DecoderRegister) (err error) + func RegisterDecoderArgon2i(r algorithm.DecoderRegister) (err error) + func RegisterDecoderArgon2id(r algorithm.DecoderRegister) (err error) + type Digest struct + func (d *Digest) Encode() (encodedHash string) + func (d *Digest) Key() []byte + func (d *Digest) M() uint32 + func (d *Digest) Match(password string) (match bool) + func (d *Digest) MatchAdvanced(password string) (match bool, err error) + func (d *Digest) MatchBytes(passwordBytes []byte) (match bool) + func (d *Digest) MatchBytesAdvanced(passwordBytes []byte) (match bool, err error) + func (d *Digest) P() uint32 + func (d *Digest) Salt() []byte + func (d *Digest) String() string + func (d *Digest) T() uint32 + func (d *Digest) V() uint8 + func (d *Digest) Variant() Variant + type Hasher struct + func New(opts ...Opt) (hasher *Hasher, err error) + func (h *Hasher) Clone() *Hasher + func (h *Hasher) Copy(hasher *Hasher) + func (h *Hasher) Hash(password string) (digest algorithm.Digest, err error) + func (h *Hasher) HashWithSalt(password string, salt []byte) (digest algorithm.Digest, err error) + func (h *Hasher) Merge(hash *Hasher) + func (h *Hasher) MustHash(password string) (hashed algorithm.Digest) + func (h *Hasher) Validate() (err error) + func (h *Hasher) WithOptions(opts ...Opt) (err error) + type Opt func(h *Hasher) (err error) + func WithIterations(t int) Opt + func WithK(k int) Opt + func WithKeyLength(k int) Opt + func WithM(m uint32) Opt + func WithMemoryInKiB(m uint32) Opt + func WithP(p int) Opt + func WithParallelism(p int) Opt + func WithProfileRFC9106LowMemory() Opt + func WithProfileRFC9106Recommended() Opt + func WithS(s int) Opt + func WithSaltLength(s int) Opt + func WithT(t int) Opt + func WithTagLength(k int) Opt + func WithVariant(variant Variant) Opt + func WithVariantD() Opt + func WithVariantI() Opt + func WithVariantID() Opt + func WithVariantName(identifier string) Opt + type Profile int + const ProfileRFC9106LowMemory + const ProfileRFC9106Recommended + func (p Profile) Hasher() *Hasher + type Variant int + const VariantD + const VariantI + const VariantID + const VariantNone + func NewVariant(identifier string) (variant Variant) + func (v Variant) KeyFunc() argon2.KeyFunc + func (v Variant) Prefix() (prefix string) + func (v Variant) String() string