pub struct PasscodeKdf {
pub kind: u32,
pub generation: u32,
pub memory: u32,
pub time: u32,
pub parallelism: u32,
}Expand description
Parameters of one passcode wrap.
For Argon2id memory is the memory cost in KiB, time the pass count,
and parallelism the lane count; for scrypt they are N, r, and p.
Fields§
§kind: u32KDF family: KDF_ARGON2ID or KDF_SCRYPT.
generation: u32Generation of the wrap; only wraps of the committed generation are live.
memory: u32Argon2id memory in KiB, or scrypt N.
time: u32Argon2id passes, or scrypt r.
parallelism: u32Argon2id lanes, or scrypt p.
Implementations§
Source§impl PasscodeKdf
impl PasscodeKdf
Sourcepub fn cost_within_limits(&self) -> bool
pub fn cost_within_limits(&self) -> bool
Whether the cost is inside the read caps of crate::kdf; other
kinds have no cost and are always within limits.
Trait Implementations§
Source§impl Clone for PasscodeKdf
impl Clone for PasscodeKdf
impl Copy for PasscodeKdf
Source§impl Debug for PasscodeKdf
impl Debug for PasscodeKdf
impl Eq for PasscodeKdf
Source§impl PartialEq for PasscodeKdf
impl PartialEq for PasscodeKdf
impl StructuralPartialEq for PasscodeKdf
Auto Trait Implementations§
impl Freeze for PasscodeKdf
impl RefUnwindSafe for PasscodeKdf
impl Send for PasscodeKdf
impl Sync for PasscodeKdf
impl Unpin for PasscodeKdf
impl UnsafeUnpin for PasscodeKdf
impl UnwindSafe for PasscodeKdf
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<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.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