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 AlgIdentifier + const AlgIdentifierVariantSun + const AlgName + const EncodingFmt + const EncodingFmtSun + const EncodingFmtSunIterations + const IterationsDefault + const IterationsMax + const IterationsMin + const SaltCharSet + const SaltLengthDefault + const SaltLengthMax + const SaltLengthMin + const VariantNameStandard + const VariantNameSun + 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 RegisterDecoderCommon(r algorithm.DecoderRegister) (err error) + func RegisterDecoderSun(r algorithm.DecoderRegister) (err error) + type Digest struct + func (d *Digest) Encode() string + func (d *Digest) Iterations() uint32 + func (d *Digest) Key() []byte + 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) Salt() []byte + func (d *Digest) String() string + func (d *Digest) Variant() Variant + type Hasher struct + func New(opts ...Opt) (hasher *Hasher, err error) + 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) MustHash(password string) (digest 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(iterations uint32) Opt + func WithRounds(rounds uint32) Opt + func WithSaltLength(bytes int) Opt + func WithVariant(variant Variant) Opt + func WithVariantName(identifier string) Opt + type Variant int + const VariantNone + const VariantStandard + const VariantSun + func NewVariant(identifier string) (variant Variant) + func (v Variant) Prefix() (prefix string) + func (v Variant) String() (prefix string)