INNER CODE UNIT · Rust
ref_offset
brndnmtthws/dryoc · src/argon2/mod.rs:554
let ref_offset = (instance.lane_length as u64 * ref_lane + ref_index as u64) as usize;
// The reference block is never the current or the previous one
// (`index_alpha` excludes them), and the previous block is a
// different slot by construction, so the three are disjoint.
let [curr_block, prev_block, ref_block] = instance
.region
.memory
.get_disjoint_mut([curr_offset as usize, prev_offset as usize, ref_offset])
.expect("argon2 current, previous and reference blocks are distinct");
fill_block(
curr_block,
prev_block,
ref_block,
position.pass != 0,
&mut scratch,
);
prev_offset += 1;
}