[−][src]Struct argon2::Config
Structure containing configuration settings.
Examples
use argon2::{Config, ThreadMode, Variant, Version}; let config = Config::default(); assert_eq!(config.ad, &[]); assert_eq!(config.hash_length, 32); assert_eq!(config.lanes, 1); assert_eq!(config.mem_cost, 4096); assert_eq!(config.secret, &[]); assert_eq!(config.thread_mode, ThreadMode::Sequential); assert_eq!(config.time_cost, 3); assert_eq!(config.variant, Variant::Argon2i); assert_eq!(config.version, Version::Version13);
Fields
ad: &'a [u8]
The associated data.
hash_length: u32
The length of the resulting hash.
lanes: u32
The number of lanes.
mem_cost: u32
The amount of memory requested (KB).
secret: &'a [u8]
The key.
thread_mode: ThreadMode
The thread mode.
time_cost: u32
The number of passes.
variant: Variant
The variant.
version: Version
The version number.
Methods
impl<'a> Config<'a>
[src]
pub fn uses_sequential(&self) -> bool
[src]
Trait Implementations
impl<'a> Clone for Config<'a>
[src]
impl<'a> Debug for Config<'a>
[src]
impl<'a> Default for Config<'a>
[src]
impl<'a> PartialEq<Config<'a>> for Config<'a>
[src]
impl<'a> StructuralPartialEq for Config<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Config<'a>
impl<'a> Send for Config<'a>
impl<'a> Sync for Config<'a>
impl<'a> Unpin for Config<'a>
impl<'a> UnwindSafe for Config<'a>
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,