Function argon2::hash_encoded_std
[−]
[src]
pub fn hash_encoded_std(variant: Variant,
version: Version,
mem_cost: u32,
time_cost: u32,
parallelism: u32,
pwd: &[u8],
salt: &[u8],
hash_len: u32)
-> Result<String>
Hashes the password and returns the encoded hash (standard).
Examples
use argon2::{self, Variant, Version}; let mem_cost = 4096; let time_cost = 10; let parallelism = 1; let pwd = b"password"; let salt = b"somesalt"; let hash_len = 32; let encoded = argon2::hash_encoded_std(Variant::Argon2i, Version::Version13, mem_cost, time_cost, parallelism, pwd, salt, hash_len).unwrap();
Remarks
The following settings are used:
- lanes: parallelism
- threads: parallelism
- secret: empty slice
- ad: empty slice ```