Function argon2::verify_raw
source · pub fn verify_raw(
pwd: &[u8],
salt: &[u8],
hash: &[u8],
config: &Config<'_>
) -> Result<bool>
Expand description
Verifies the password with the supplied configuration.
Examples
use argon2::{self, Config};
let pwd = b"password";
let salt = b"somesalt";
let hash = &[158, 135, 137, 200, 180, 40, 52, 34, 10, 252, 0, 8, 90, 199,
58, 204, 48, 134, 81, 33, 105, 148, 171, 191, 221, 214, 155,
37, 146, 3, 46, 253];
let config = Config::rfc9106_low_mem();
let res = argon2::verify_raw(pwd, salt, hash, &config).unwrap();
assert!(res);