Skip to main content

verify_password

Function verify_password 

Source
pub fn verify_password(password: &str, password_hash: &str) -> Result
Expand description

Verifies a plaintext password against an encoded Argon2 password hash.

Cost parameters come from the encoded hash, so a hash written under any cost still verifies. Malformed hashes and password mismatches return an error.