Argon2.step: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend as Argon2 Lines 251-259 of bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&start_line=251&end_line=259 import Base import bend-collections@1.0.0.0/src/crypto/argon2/types.bend as A import bend-collections@1.0.0.0/src/crypto/argon2/blamka.bend as G import bend-collections@1.0.0.0/src/crypto/argon2/memory.bend as M # One block: pair holds the memory and the previous block. def step(+r: Nat, +l: Nat, +s: Nat, +idx: Nat, +p: Nat, +q: Nat, +sl: Nat, +cur: Nat, +indep: Bool, +addr: A.Block, pair: Array & A.Block) -> Array: (a, +prev) = pair +r0 = Nat.is_eq(r, 0n) +pr = pick(indep, addr, idx, prev) +rl = ref_lane(Bool.and(r0, Nat.is_eq(s, 0n)), l, hi(pr), p) +w = area(area_base(r0, s, sl, q), idx, Nat.is_eq(rl, l)) +ri = Nat.mod(Nat.add(start(r0, s, sl), rel(w, G.lo(pr))), q) with_ref(r0, cur, prev, M.get(Nat.add(Nat.mul(rl, q), ri), a)) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=area https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=area_base https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=hi https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=pick https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=ref_lane https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=rel https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=start https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend&name=with_ref https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/blamka.bend&name=lo https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/memory.bend&name=get https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/argon2/types.bend&name=Block