Enum argon2::Algorithm [−][src]
Argon2 primitive type: variants of the algorithm.
Variants
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.
Optimized to resist side-channel attacks.
Accesses the memory array in a password independent order, increasing the possibility of time-memory tradeoff (TMTO) attacks.
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]
password-hash
only.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.
fn from_str(s: &str) -> Result<Algorithm, Error>
[src]
impl Ord for Algorithm
[src]
fn cmp(&self, other: &Algorithm) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Algorithm> for Algorithm
[src]
fn eq(&self, other: &Algorithm) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Algorithm> for Algorithm
[src]
fn partial_cmp(&self, other: &Algorithm) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Algorithm
[src]
impl StructuralPartialEq for Algorithm
[src]
impl<'a> TryFrom<Ident<'a>> for Algorithm
[src]
password-hash
only.type Error = HasherError
The type returned in the event of a conversion error.
fn try_from(ident: Ident<'a>) -> Result<Algorithm, HasherError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Algorithm
[src]
impl Send for Algorithm
[src]
impl Sync for Algorithm
[src]
impl Unpin for Algorithm
[src]
impl UnwindSafe for Algorithm
[src]
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,