package
0.2.25
Repository: https://github.com/go-crypt/crypt.git
Documentation: pkg.go.dev

# Functions

Decode the encoded digest into a algorithm.Digest.
DecodeVariant the encoded digest into a algorithm.Digest provided it matches the provided Variant.
New returns a *Hasher without any settings configured.
NewSHA256 returns a *Hasher with the SHA256 hash.Hash which d to 1000000 iterations.
NewSHA512 returns a *Hasher with the SHA512 hash.Hash which d to 1000000 iterations.
NewVariant converts an identifier string to a shacrypt.Variant.
RegisterDecoder the decoder with the algorithm.DecoderRegister.
RegisterDecoderSHA256 registers specifically the sha256 decoder variant with the algorithm.DecoderRegister.
RegisterDecoderSHA512 registers specifically the sha512 decoder variant with the algorithm.DecoderRegister.
WithIterations sets the iterations parameter of the resulting shacrypt.Digest.
WithRounds is an alias for shacrypt.WithIterations.
WithSaltLength adjusts the salt size (in bytes) of the resulting shacrypt.Digest.
WithSHA256 adjusts this Hasher to utilize the SHA256 hash.Hash.
WithSHA512 adjusts this Hasher to utilize the SHA512 hash.Hash.
WithVariant configures the shacrypt.Variant of the resulting shacrypt.Digest.
WithVariantName uses the variant name or identifier to configure the shacrypt.Variant of the resulting shacrypt.Digest.

# Constants

AlgIdentifierSHA256 is the identifier used in encoded SHA256 variants of this algorithm.
AlgIdentifierSHA512 is the identifier used in encoded SHA512 variants of this algorithm.
AlgName is the name for this algorithm.
EncodingFmt is the encoding format for this algorithm.
EncodingFmtRoundsOmitted is the encoding format for this algorithm when the rounds can be omitted.
IterationsDefaultOmitted is the default number of iterations when the rounds are omitted.
IterationsDefaultSHA256 is the default number of iterations for SHA256.
IterationsDefaultSHA512 is the default number of iterations for SHA512.
IterationsMax is the maximum number of iterations accepted.
IterationsMin is the minimum number of iterations accepted.
SaltCharSet are the valid characters for the salt.
SaltLengthMax is the maximum salt length.
SaltLengthMin is the minimum salt length.
VariantNone is a variant of the shacrypt.Digest which is unknown.
VariantSHA256 is a variant of the shacrypt.Digest which uses SHA-256.
VariantSHA512 is a variant of the shacrypt.Digest which uses SHA-512.

# Structs

Digest is a digest which handles SHA-crypt hashes like SHA256 or SHA512.
Hasher is a algorithm.Hash for SHA-crypt which can be initialized via shacrypt.New using a functional options pattern.

# Type aliases

Opt describes the functional option pattern for the shacrypt.Hasher.
Variant is a variant of the shacrypt.Digest.