Struct libpasta::config::DEFAULT_ALG
[−]
pub struct DEFAULT_ALG { /* fields omitted */ }
Default algorithm to use for new hash computations.
Methods from __Deref<Target = Algorithm>
fn hash(&self, password: Cleartext) -> Output
Type-safe function to compute the hash of a password.
fn hash_with_salt(&self, password: &[u8], salt: &[u8]) -> Vec<u8>
Computes the hash output for given password and salt.
fn verify(&self, password: &[u8], salt: &[u8], hash: &[u8]) -> bool
Verifies the password, salt and hash are matching by recursively re-computing the hash and verifying the final value.
fn needs_migrating(&self) -> bool
Test whether the current 'Algorithm` is sufficiently secure.
fn to_wrapped(&self, outer: Primitive) -> Self
Copies self
into a new Algorithm
wrapped by outer
fn into_wrapped(self, outer: Primitive) -> Self
Moves self
into a new Algorithm
wrapped by outer
Trait Implementations
impl __Deref for DEFAULT_ALG
type Target = Algorithm
The resulting type after dereferencing
fn deref(&self) -> &Algorithm
The method called to dereference a value