Function pbkdf2::pbkdf2_check[][src]

pub fn pbkdf2_check(
    password: &str,
    hashed_value: &str
) -> Result<(), CheckError>

Compares a password against the result of a pbkdf2_simple.

It will return Ok(()) if password hashes to the same value, if hashes are different it will return Err(CheckError::HashMismatch), and Err(CheckError::InvalidFormat) if hashed_value has an invalid format.

Arguments

  • password - The password to process
  • hashed_value - A string representing a hashed password returned by pbkdf2_simple