INNER CODE UNIT · Rust
new
brndnmtthws/dryoc · src/argon2/mod.rs:224
fn new(
memory_blocks: u32,
segment_length: u32,
type_: Argon2Type,
t_cost: u32,
lanes: u32,
) -> Result<Self, Error> {
let mut ret = Self {
region: BlockRegion::default(),
pseudo_rands: Vec::new(),
memory_blocks,
segment_length,
type_,
lane_length: segment_length * ARGON2_SYNC_POINTS,
passes: t_cost,
lanes,
};
ret.initialize()?;