Struct libpasta::primitives::Pbkdf2
[−]
[src]
pub struct Pbkdf2 { /* fields omitted */ }
Struct holding PBKDF2
parameters.
This implementation is backed by fastpbkdf2
.
Methods
impl Pbkdf2
[src]
fn default() -> Primitive
Create a new PBKDF2 instance using defaults.
fn new(iterations: u32, algorithm: &'static Algorithm) -> Primitive
Create a new PBKDF2 instance.
Trait Implementations
impl PrimitiveImpl for Pbkdf2
[src]
fn compute<'a>(&'a self, password: &[u8], salt: &[u8]) -> Vec<u8>
Compute the scrypt hash
fn params_as_vec(&self) -> Vec<(&'static str, String)>
Convert parameters into a vector of (key, value) tuples for serializing.
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