Argon2.regen: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend as Argon2 Lines 230-238 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend&start_line=230&end_line=238 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/types.bend as A # In a data-independent segment a new address block is computed for the # segment's first position and at every multiple of 128, with counter # idx / 128 + 1 (the i-th address block has counter i). def regen(need: Bool, addr: A.Block, +r: Nat, +l: Nat, +s: Nat, +mm: Nat, +t: Nat, +idx: Nat) -> A.Block: match need: case True{}: addresses(r, l, s, mm, t, Nat.add(Nat.div(idx, 128n), 1n)) case False{}: addr Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend&name=addresses https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/types.bend&name=Block