#[non_exhaustive]pub struct PasswordConfig {
pub memory_cost_kib: u32,
pub time_cost: u32,
pub parallelism: u32,
pub output_len: usize,
}Expand description
Argon2id hashing parameters.
Deserializes from YAML/TOML config. All fields have OWASP-recommended defaults: 19 MiB memory, 2 iterations, 1 thread, 32-byte output.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.memory_cost_kib: u32Memory cost in kibibytes (default: 19456 = 19 MiB).
time_cost: u32Number of iterations (default: 2).
parallelism: u32Degree of parallelism (default: 1).
output_len: usizeOutput hash length in bytes (default: 32).
Trait Implementations§
Source§impl Clone for PasswordConfig
impl Clone for PasswordConfig
Source§fn clone(&self) -> PasswordConfig
fn clone(&self) -> PasswordConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PasswordConfig
impl Debug for PasswordConfig
Source§impl Default for PasswordConfig
impl Default for PasswordConfig
Source§impl<'de> Deserialize<'de> for PasswordConfigwhere
PasswordConfig: Default,
impl<'de> Deserialize<'de> for PasswordConfigwhere
PasswordConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PasswordConfig
impl RefUnwindSafe for PasswordConfig
impl Send for PasswordConfig
impl Sync for PasswordConfig
impl Unpin for PasswordConfig
impl UnsafeUnpin for PasswordConfig
impl UnwindSafe for PasswordConfig
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