Expand description
Argon2id, version 1.3, one lane, caller-supplied memory.
§Examples
use argon2id_p1::{Algorithm, Argon2, Block, Params, Version};
let params = Params::new(64, 2, 1, Some(32))?; // 64 KiB, 2 passes, 1 lane, 32-byte tag
let mut memory = vec![Block::new(); params.block_count()];
let argon2 = Argon2::new(Algorithm::Argon2id, Version::V0x13, params);
let mut tag = [0u8; 32];
argon2.hash_password_into_with_memory(b"password", b"0123456789abcdef", &mut tag, &mut memory)?;Working memory belongs to the caller — whether it comes from a fallible
reservation, an arena, or a static buffer is the caller’s policy. Slices
longer than Params::block_count are fine; the excess is ignored.
Structs§
- Argon2
- The Argon2id v1.3 hasher: parameters bound at construction, all work done
in
hash_password_into_with_memoryover memory the caller owns. - Block
- A 1024-byte Argon2 memory block (RFC 9106 §3.1: 128 64-bit words).
- Params
- Argon2id cost parameters.