pub struct HashOpts {
pub iterations: NonZeroU32,
pub salt: [u8; 32],
}Expand description
The options for hashing a password
Fields§
§iterations: NonZeroU32The number of iterations to use for PBKDF2
salt: [u8; 32]The salt to use for PBKDF2. It is up to the caller to ensure that however the salt is generated, it is cryptographically secure.
Trait Implementations§
impl StructuralPartialEq for HashOpts
Auto Trait Implementations§
impl Freeze for HashOpts
impl RefUnwindSafe for HashOpts
impl Send for HashOpts
impl Sync for HashOpts
impl Unpin for HashOpts
impl UnwindSafe for HashOpts
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> 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