pub struct PasswordCost {
pub m_kib: u32,
pub t: u32,
pub p: u32,
}Expand description
argon2id cost. The default is OWASP’s recommendation (19 MiB, 2 passes, 1 lane), about 30 ms on a server core; tests use a cheap one.
Fields§
§m_kib: u32§t: u32§p: u32Implementations§
Source§impl PasswordCost
impl PasswordCost
Sourcepub fn insecure_fast() -> Self
pub fn insecure_fast() -> Self
For tests only: fast, and useless against an offline attacker.
Trait Implementations§
Source§impl Clone for PasswordCost
impl Clone for PasswordCost
impl Copy for PasswordCost
Source§impl Debug for PasswordCost
impl Debug for PasswordCost
Source§impl Default for PasswordCost
impl Default for PasswordCost
impl Eq for PasswordCost
Source§impl PartialEq for PasswordCost
impl PartialEq for PasswordCost
impl StructuralPartialEq for PasswordCost
Auto Trait Implementations§
impl Freeze for PasswordCost
impl RefUnwindSafe for PasswordCost
impl Send for PasswordCost
impl Sync for PasswordCost
impl Unpin for PasswordCost
impl UnsafeUnpin for PasswordCost
impl UnwindSafe for PasswordCost
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.