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 AlgIdentifierBase64 + const AlgIdentifierPlainText + const AlgName + const EncodingFmt + 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 RegisterDecoderBase64(r algorithm.DecoderRegister) (err error) + func RegisterDecoderPlainText(r algorithm.DecoderRegister) (err error) + type Digest struct + func NewBase64Digest(password string) (digest Digest) + func NewDigest(password string) (digest Digest) + func (d *Digest) Encode() string + 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) String() string + func (d *Digest) Variant() Variant + type Hasher struct + func New(opts ...Opt) (hasher *Hasher, err error) + func (h *Hasher) Hash(password string) (hashed algorithm.Digest, err error) + func (h *Hasher) HashWithSalt(password string, _ []byte) (hashed algorithm.Digest, err error) + 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 WithVariant(variant Variant) Opt + func WithVariantName(identifier string) Opt + type Variant int + const VariantBase64 + const VariantNone + const VariantPlainText + func NewVariant(identifier string) (variant Variant) + func (v Variant) Decode(src string) (dst []byte, err error) + func (v Variant) Encode(src []byte) (dst string) + func (v Variant) Prefix() (prefix string)