Expand description
A re-implementation of the phpbb_check_hash
function (from phpBB 3) in
Rust. It allows verifying a salted hash against a password.
§Usage
To verify a hash against a password:
use phpbb_pwhash::{check_hash, CheckHashResult};
let hash = "$H$9/O41.qQjQNlleivjbckbSNpfS4xgh0";
assert_eq!(
check_hash(hash, "pass1234"),
CheckHashResult::Valid
);
assert_eq!(
check_hash(hash, "pass1235"),
CheckHashResult::Invalid
);
Structs§
- Phpbb
Hash - A parsed encoded phpBB3 hash
Enums§
- Check
Hash Result - The result type returned by
check_hash
. - Invalid
Hash - The error returned if the encoded hash is invalid.
Functions§
- check_
hash - Validate a password against a phpBB3 salted hash.
- parse_
hash - Parse a phpBB3 hash.