Function argon2::verify_raw [] [src]

pub fn verify_raw(pwd: &[u8],
                  salt: &[u8],
                  hash: &[u8],
                  config: &Config)
                  -> Result<bool>

Verifies the password with the supplied configuration.

Examples

use argon2::{self, Config};

let pwd = b"password";
let salt = b"somesalt";
let hash = &[137, 104, 116, 234, 240, 252, 23, 45, 187, 193, 255, 103, 166,
             126, 133, 93, 104, 130, 95, 130, 186, 165, 110, 148, 123, 80,
             103, 207, 61, 59, 103, 192];
let config = Config::default();
let res = argon2::verify_raw(pwd, salt, hash, &config).unwrap();
assert!(res);