[][src]Function argon2::hash_raw_defaults

pub fn hash_raw_defaults(pwd: &[u8], salt: &[u8]) -> Result<Vec<u8>>
Deprecated since 0.2.0:

please use hash_raw instead

Hashes the password using default settings and returns the hash as a vector.

Examples

use argon2;

let pwd = b"password";
let salt = b"somesalt";
let vec = argon2::hash_raw_defaults(pwd, salt).unwrap();

The above rewritten using hash_raw:

use argon2::{self, Config};

let pwd = b"password";
let salt = b"somesalt";
let config = Config::default();
let vec = argon2::hash_raw(pwd, salt, &config).unwrap();