[−][src]Function phpbb_pwhash::parse_hash
pub fn parse_hash(salted_hash: &str) -> Result<PhpbbHash<'_>, InvalidHash>
Parse a phpBB3 hash.
A hash for the password "pass1234" can look like this:
$H$9/O41.qQjQNlleivjbckbSNpfS4xgh0
Details:
- The first three characters are the hash type, should be '$H$'.
- The fourth character encodes the number of hashing rounds, as a power of two. For example, if the value is '9' as above, then (1 << 11) rounds are used (because the offset from the start of the alphabet for '9' is 11). The offset must be between 7 and 30.
- Characters 5-13 are the 8-byte salt.
- Characters 13 and onwards are the encoded hash.