Function argon2::verify_encoded[][src]

pub fn verify_encoded(encoded: &str, pwd: &[u8]) -> Result<bool>
Expand description

Verifies the password with the encoded hash.

Examples

use argon2;

let enc = "$argon2i$v=19$m=4096,t=3,p=1$c29tZXNhbHQ\
           $iWh06vD8Fy27wf9npn6FXWiCX4K6pW6Ue1Bnzz07Z8A";
let pwd = b"password";
let res = argon2::verify_encoded(enc, pwd).unwrap();
assert!(res);