pub struct Argon2Params {
pub memory_kib: u32,
pub passes: u32,
pub lanes: u32,
}Expand description
Cost parameters.
Fields§
§memory_kib: u32Memory in kibibytes.
passes: u32Number of passes over the memory.
lanes: u32Degree of parallelism (lanes).
Implementations§
Source§impl Argon2Params
impl Argon2Params
Sourcepub const RECOMMENDED: Argon2Params
pub const RECOMMENDED: Argon2Params
RFC 9106’s first recommendation: 2 GiB, one pass, four lanes.
Use this for offline key derivation where a second of latency and two gibibytes of resident memory are acceptable.
Sourcepub const INTERACTIVE: Argon2Params
pub const INTERACTIVE: Argon2Params
RFC 9106’s second recommendation: 64 MiB, three passes, four lanes.
For interactive logins, where the 2 GiB option would be a denial of service against your own server.
Trait Implementations§
Source§impl Clone for Argon2Params
impl Clone for Argon2Params
impl Copy for Argon2Params
Auto Trait Implementations§
impl Freeze for Argon2Params
impl RefUnwindSafe for Argon2Params
impl Send for Argon2Params
impl Sync for Argon2Params
impl Unpin for Argon2Params
impl UnsafeUnpin for Argon2Params
impl UnwindSafe for Argon2Params
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