pub struct Argon2idConfig {
pub salt: Vec<u8>,
pub time_cost: u32,
pub mem_cost: u32,
pub hash_length: u32,
}Available on crate feature
rust-argon2 only.Expand description
The configuration attributes needed to perform argon2id hashing
This implements Default using the default values from the rust-argon2 crate with the salt being an empty String.
use password_worker::Argon2idConfig;
let salt: Vec<u8> = get_rand(); // Min length 8 bytes
let config = Argon2idConfig {
salt,
..Default::default()
};Fields§
§salt: Vec<u8>The salt for the password hash (Minimum length 8 bytes)
time_cost: u32The time cost (higher takes longer)
mem_cost: u32Memory cost (higher takes longer)
hash_length: u32Length of hash output
Trait Implementations§
Source§impl Clone for Argon2idConfig
impl Clone for Argon2idConfig
Source§fn clone(&self) -> Argon2idConfig
fn clone(&self) -> Argon2idConfig
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 moreAuto Trait Implementations§
impl Freeze for Argon2idConfig
impl RefUnwindSafe for Argon2idConfig
impl Send for Argon2idConfig
impl Sync for Argon2idConfig
impl Unpin for Argon2idConfig
impl UnwindSafe for Argon2idConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more