#[repr(u32)]pub enum Algorithm {
Argon2d = 0,
Argon2i = 1,
Argon2id = 2,
}Expand description
The Argon2 primitive type (argon2_type).
The numeric values matter: initial_hash hashes them, and fill_segment
puts instance->type into input_block.v[5].
Variants§
Argon2d = 0
Argon2_d (0): data-dependent addressing.
Argon2i = 1
Argon2_i (1): data-independent addressing.
Argon2id = 2
Argon2_id (2): first half-pass independent, rest dependent. The default.
Implementations§
Source§impl Algorithm
impl Algorithm
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
argon2_type2string(type, 0): the lowercase name used in PHC strings.
Note "argon2i" is a prefix of "argon2id"; the C decoder relies on
the next character failing to parse, and the Rust decoder must too.
Sourcepub const fn as_str_uppercase(self) -> &'static str
pub const fn as_str_uppercase(self) -> &'static str
argon2_type2string(type, 1): the capitalised name (used by genkat).
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
Source§impl Ord for Algorithm
impl Ord for Algorithm
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Algorithm
impl PartialOrd for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more