Function verify_password

Source
pub fn verify_password(
    password: impl AsRef<[u8]>,
    hash: &str,
) -> Result<(), VerifyError>
Expand description

Verify the provided password against the provided password hash.

§Returns

  • Ok(()) if the password hash verified successfully
  • Err(VerifyError) if the hash didn’t parse successfully or the password failed to verify against the hash.