pub struct Params {
pub rounds: u32,
pub output_length: usize,
}Expand description
PBKDF2 params
Fields§
§rounds: u32Number of rounds
output_length: usizeSize of the output (in bytes)
Implementations§
source§impl Params
impl Params
sourcepub const RECOMMENDED_ROUNDS: usize = 600_000usize
pub const RECOMMENDED_ROUNDS: usize = 600_000usize
Recommended number of PBKDF2 rounds (used by default).
This number is adopted from the OWASP cheat sheet:
Use PBKDF2 with a work factor of 600,000 or more
Trait Implementations§
source§impl PartialEq for Params
impl PartialEq for Params
source§impl<'a> TryFrom<&'a PasswordHash<'a>> for Params
impl<'a> TryFrom<&'a PasswordHash<'a>> for Params
source§impl<'a> TryFrom<Params> for ParamsString
impl<'a> TryFrom<Params> for ParamsString
impl Copy for Params
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes