[][src]Enum pbkdf2_identifier::hash_primitive::HashPrimitive

pub enum HashPrimitive {
    HMACSHA1,
    HMACSHA224,
    HMACSHA256,
    HMACSHA384,
    HMACSHA512,
}

A wrapper around various common primitives used for PBKDF2. Implements a name and the closure to compute the values. This will later on be a userful abstraction when differentiating between webassembly and multithreaded code.

Variants

HMACSHA1
HMACSHA224
HMACSHA256
HMACSHA384
HMACSHA512

Methods

impl HashPrimitive[src]

pub fn name(&self) -> &'static str[src]

Returns a readable name for the primitive.

pub fn get_identifier(
    &self
) -> Box<dyn Fn(&[u8], &[u8], &[u8], Option<usize>) -> Option<usize>>
[src]

Returns a closure for identifying the iteration count for this specific algorithm.

pub fn get_identifier_threaded(
    &self
) -> Box<dyn Fn(&[u8], &[u8], &[u8], Option<usize>, &AtomicBool) -> Option<usize>>
[src]

Returns a closure for identifying the iteration count for this specific algorithm.

Trait Implementations

impl Clone for HashPrimitive[src]

impl Copy for HashPrimitive[src]

impl PartialEq<HashPrimitive> for HashPrimitive[src]

impl Debug for HashPrimitive[src]

impl StructuralPartialEq for HashPrimitive[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self