Crate bonsaidb::local::argon2::password_hash
Expand description
RustCrypto: Password Hashing Traits
Traits which describe the functionality of password hashing algorithms.
About
Provides a no_std
-friendly implementation of the
Password Hashing Competition (PHC) string format specification
(a well-defined subset of the Modular Crypt Format a.k.a. MCF) which
works in conjunction with the traits this crate defines.
Supported Crates
See RustCrypto/password-hashes for algorithm implementations which use this crate for interoperability:
argon2
- Argon2 memory hard key derivation functionpbkdf2
- Password-Based Key Derivation Function v2scrypt
- scrypt key derivation function
Minimum Supported Rust Version
Rust 1.60 or higher.
Minimum supported Rust version may be changed in the future, but it will be accompanied by a minor version bump.
SemVer Policy
- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above
License
Licensed under either of:
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Usage
This crate represents password hashes using the PasswordHash
type, which
represents a parsed “PHC string” with the following format:
$<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]]
For more information, please see the documentation for PasswordHash
.
Modules
- Error types.
- Random number generation traits
Structs
- Algorithm or parameter identifier.
- Output from password hashing functions, i.e. the “hash” or “digest” as raw bytes.
- Algorithm parameter string.
- Password hash.
- Serialized
PasswordHash
. - Salt string.
- Owned stack-allocated equivalent of
Salt
. - Algorithm parameter value string.
Enums
- Base64 encoding variants.
- Password hashing errors.
Traits
- Trait for password hashing algorithms which support the legacy Modular Crypt Format (MCF).
- Trait for password hashing functions.
- Trait for password verification.
Type Aliases
- Type used to represent decimal (i.e. integer) values.
- Result type.