Traits which describe the functionality of password hashing algorithms.
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.
See RustCrypto/password-hashes for algorithm implementations which use this crate for interoperability:
argon2- Argon2 memory hard key derivation function
pbkdf2- Password-Based Key Derivation Function v2
scrypt- scrypt key derivation function
Rust 1.57 or higher.
Minimum supported Rust version may be changed in the future, but it will be accompanied by a minor version bump.
- All on-by-default features of this library are covered by SemVer
- MSRV is considered exempt from SemVer as noted above
Licensed under either of:
at your option.
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.
This crate represents password hashes using the
PasswordHash type, which
represents a parsed “PHC string” with the following format:
For more information, please see the documentation for
Algorithm or parameter identifier.
Output from password hashing functions, i.e. the “hash” or “digest” as raw bytes.
Algorithm parameter string.
Algorithm parameter value string.
Trait for password hashing functions.
Trait for password verification.