[−][src]Enum libpasta::hashing::Algorithm
libpasta
password hashing algorithms can be nested, which is captured
by this recursive enum.
Variants
Single(Primitive)
A single instance of a password-hashing primitive.
The password-hashing algorithm is composed of nested primitives.
Fields of Nested
Implementations
impl Algorithm
[src]
pub fn hash(&self, password: &str) -> Output
[src]
Type-safe function to compute the hash of a password.
pub fn hash_with_salt(&self, password: &[u8], salt: &[u8]) -> Vec<u8>
[src]
Computes the hash output for given password and salt.
pub fn verify(&self, password: &[u8], salt: &[u8], hash: &[u8]) -> bool
[src]
Verifies the password, salt and hash are matching by recursively re-computing the hash and verifying the final value.
pub fn needs_migrating(&self, prim: &Primitive) -> bool
[src]
Test whether the current 'Algorithm` is sufficiently secure.
pub fn to_wrapped(&self, outer: Primitive) -> Self
[src]
Copies self
into a new Algorithm
wrapped by outer
pub fn into_wrapped(self, outer: Primitive) -> Self
[src]
Moves self
into a new Algorithm
wrapped by outer
Trait Implementations
impl Clone for Algorithm
[src]
impl Debug for Algorithm
[src]
impl Default for Algorithm
[src]
impl PartialEq<Algorithm> for Algorithm
[src]
impl<'a> Serialize for Algorithm
[src]
impl StructuralPartialEq for Algorithm
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl !UnwindSafe for Algorithm
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,