Skip to main content

non_truncating_hash

Function non_truncating_hash 

Source
pub fn non_truncating_hash<P: AsRef<[u8]>>(
    password: P,
    cost: u32,
) -> BcryptResult<String>
Expand description

hash, but rejects passwords of 72 bytes or more instead of silently truncating them.

ยงErrors

Truncation for password.len() >= 72; otherwise same as hash.