Enum argon2::Algorithm[][src]

pub enum Algorithm {
    Argon2d,
    Argon2i,
    Argon2id,
}

Argon2 primitive type: variants of the algorithm.

Variants

Argon2d

Optimizes against GPU cracking attacks but vulnerable to side-channels.

Accesses the memory array in a password dependent order, reducing the possibility of time–memory tradeoff (TMTO) attacks.

Argon2i

Optimized to resist side-channel attacks.

Accesses the memory array in a password independent order, increasing the possibility of time-memory tradeoff (TMTO) attacks.

Argon2id

Hybrid that mixes Argon2i and Argon2d passes (default).

Uses the Argon2i approach for the first half pass over memory and Argon2d approach for subsequent passes. This effectively places it in the "middle" between the other two: it doesn't provide as good TMTO/GPU cracking resistance as Argon2d, nor as good of side-channel resistance as Argon2i, but overall provides the most well-rounded approach to both classes of attacks.

Implementations

impl Algorithm[src]

pub fn new(id: impl AsRef<str>) -> Result<Self, Error>[src]

Parse an Algorithm from the provided string.

pub fn as_str(&self) -> &str[src]

Get the identifier string for this PBKDF2 Algorithm.

pub fn ident(&self) -> Ident<'static>[src]

This is supported on crate feature password-hash only.

Get the Ident that corresponds to this Argon2 Algorithm.

Trait Implementations

impl AsRef<str> for Algorithm[src]

impl Clone for Algorithm[src]

impl Copy for Algorithm[src]

impl Debug for Algorithm[src]

impl Default for Algorithm[src]

impl Display for Algorithm[src]

impl Eq for Algorithm[src]

impl FromStr for Algorithm[src]

type Err = Error

The associated error which can be returned from parsing.

impl Ord for Algorithm[src]

impl PartialEq<Algorithm> for Algorithm[src]

impl PartialOrd<Algorithm> for Algorithm[src]

impl StructuralEq for Algorithm[src]

impl StructuralPartialEq for Algorithm[src]

impl<'a> TryFrom<Ident<'a>> for Algorithm[src]

This is supported on crate feature password-hash only.

type Error = HasherError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

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.