Function argon2::verify_encoded_ext
source · pub fn verify_encoded_ext(
encoded: &str,
pwd: &[u8],
secret: &[u8],
ad: &[u8]
) -> Result<bool>
Expand description
Verifies the password with the encoded hash, secret and associated data.
Examples
use argon2;
let enc = "$argon2i$v=19$m=4096,t=3,p=1$c29tZXNhbHQ\
$OlcSvlN20Lz43sK3jhCJ9K04oejhiY0AmI+ck6nuETo";
let pwd = b"password";
let secret = b"secret";
let ad = b"ad";
let res = argon2::verify_encoded_ext(enc, pwd, secret, ad).unwrap();
assert!(res);