pub struct KdfParams {
pub m_cost_kib: u32,
pub t_cost: u32,
pub p_cost: u32,
}Expand description
Argon2id parameters.
Parameters are stored inside every encrypted container so that defaults can evolve in the future without breaking older files. When parsing parameters from untrusted input they are validated against the bounds documented on each field to prevent denial-of-service via absurd values.
Fields§
§m_cost_kib: u32Memory cost in KiB (Argon2 m). Default 65536 (64 MiB).
Accepted range when reading untrusted input: 8 MiB ..= 4 GiB.
t_cost: u32Time cost — number of passes (Argon2 t). Default 4.
Accepted range: 1 ..= 64.
p_cost: u32Degree of parallelism (Argon2 p). Default 4.
Accepted range: 1 ..= 16.
Implementations§
Trait Implementations§
impl Copy for KdfParams
Source§impl<'de> Deserialize<'de> for KdfParams
impl<'de> Deserialize<'de> for KdfParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KdfParams
impl StructuralPartialEq for KdfParams
Auto Trait Implementations§
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