StructsΒ§
- Hash
Opts - The options for hashing a password
- Password
Hash - Scram
Sha256 πHash - The SCRAM-SHA-256 hash
EnumsΒ§
ConstantsΒ§
- DEFAULT_
ITERATIONS π - The default iteration count as suggested by https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html
- DEFAULT_
SALT_ πSIZE - The default salt size, which isnβt currently configurable.
- SHA256_
OUTPUT_ πLEN
FunctionsΒ§
- hash_
password - Hashes a password using PBKDF2 with SHA256 and a random salt.
- hash_
password_ πinner - hash_
password_ with_ opts - Hashes a password using PBKDF2 with SHA256 and the given options.
- scram256_
hash - Hashes a password using PBKDF2 with SHA256,
and returns it in the SCRAM-SHA-256 format.
The format is SCRAM-SHA-256$
: $<client_key>:<server_key> - scram256_
hash_ πinner - scram256_
parse_ πopts - Parses a SCRAM-SHA-256 hash and returns the options used to create it.
- scram256_
verify - Verifies a password against a SCRAM-SHA-256 hash.