pub struct KdfParams {
pub m_cost: u32,
pub t_cost: u32,
pub p_cost: u32,
}Expand description
Argon2id cost parameters. Stored (unencrypted) in the file header so the KEK can be re-derived on open.
Fields§
§m_cost: u32Memory cost in KiB.
t_cost: u32Time cost (number of iterations).
p_cost: u32Parallelism (lanes).
Implementations§
Source§impl KdfParams
impl KdfParams
Sourcepub fn raw_key() -> Self
pub fn raw_key() -> Self
PERF-1 step 7 (R-004.5): the Argon2id floor (8 KiB, one pass), for
databases unlocked by a raw random 256-bit key
(Mnemo::create_with_key). A uniformly random key has full entropy
already, so stretching it buys nothing; these are recorded in the
header so the normal open path runs in microseconds. Never use
them with a human passphrase.
Trait Implementations§
impl Copy for KdfParams
impl Eq for KdfParams
impl StructuralPartialEq for KdfParams
Auto Trait Implementations§
impl Forget for KdfParams
impl Freeze for KdfParams
impl RefUnwindSafe for KdfParams
impl Send for KdfParams
impl Sync for KdfParams
impl Unpin for KdfParams
impl UnsafeUnpin for KdfParams
impl UnwindSafe for KdfParams
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