non_truncating_hash_with_result

Function non_truncating_hash_with_result 

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

Generates a password hash using the cost given. The salt is generated randomly using the OS randomness. The function returns a result structure and allows to format the hash in different versions. Will return BcryptError::Truncation if password is longer than 72 bytes