Struct libpasta::primitives::Argon2
[−]
[src]
pub struct Argon2 { /* fields omitted */ }
Parameter set for Argon2.
This implementation is backed by the argon2rs
crate.
Methods
impl Argon2
[src]
fn default() -> Primitive
Get the default Argon2i parameter set
fn new(passes: u32, lanes: u32, kib: u32) -> Primitive
Creates a new Argon2i instance
Trait Implementations
impl PrimitiveImpl for Argon2
[src]
fn compute<'a>(&'a self, password: &[u8], salt: &[u8]) -> Vec<u8>
Compute the output of the primitive with input password
and salt
.
fn params_as_vec(&self) -> Vec<(&'static str, String)>
Output the parameters of the primitive as a list of tuples.
fn hash_id(&self) -> Hashes
Return algorithm type as a MCF-compatible hash identifier.
fn verify(&self, password: &[u8], salt: &[u8], hash: &[u8]) -> bool
Verify the password and salt against the hash. Read more