Struct libpasta::primitives::Hmac
[−]
[src]
pub struct Hmac { /* fields omitted */ }
Password storage strengthening using HMAC.
This struct holds the parameters used.
Represents the ring
implementation.
Methods
impl Hmac
[src]
fn with_key(h: &'static Algorithm, key: &[u8]) -> Primitive
Construct a new Hmac
instance with a specified key
fn default() -> Primitive
Gets a default HMAC instance, generating a fresh new key.
Trait Implementations
impl PrimitiveImpl for Hmac
[src]
fn compute(&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