Involved Source Filesargon2.gobuiltin.go
Package crypt provides a UNIX crypt-style API for password hashing using
structured hashes in PHC format.
# Built-in functions
This package provides the built-in implementations for widely used password
hashing algorithms with reasonable default parameter values.
## Argon2
Argon2 implementation supports Argon2i and Argon2id variants, and requires
explicit memory, iterations and parallelism parameters.
$argon2<variant>[$v=<version>]$m=<memory>,t=<iterations>,p=<parallelism>[$<salt>[$<hash>]]
Package-Level Type Names (total 4, in which 1 are exported)
/* sort exporteds by: | */
Crypter is a UNIX crypt-like API that can be used both for password
registration, and for password verification.
Crypt computes the hash of password string k using the given hash
parameters. Applying Crypt to the returned hash is deterministic,
that is, it always returns the same result that is equal to the
returned hash.
If h contains a salt string without output, then Crypt computes a
hash output whose length is the default output length for the
specified hash algorithm. The resulting hash contains a strict,
deterministic encoding of the used parameters, salt and output.
If h does not contain salt (and therefore output), then it generates
a new new appropriate salt value as mandated by the specified hash
algorithm using the defined default salt length, and then proceeds
as in the previous case.
If h contains hash function output, then it computes an output with
exactly the same length as the one provided in the input. It returns
the exact parameters and salt as they were received, and the newly
computed output. Basically, it recomputes hash output for password
verification.
crypter
func Argon2() Crypter
func Default() Crypter
crypter is the default Crypter implementation that delegates to
algorithm-specific parsedCrypter based on the hash ID.
Crypt implements the Crypter interface.
crypter : Crypter
var defaultArgon2Crypter
var defaultCrypter
crypterArgon2 is the parsedCrypter implementation for Argon2 functions.
randio.Reader
Crypt implements the parsedCrypter interface.
*crypterArgon2 : parsedCrypter
var defaultArgon2