Argon2.hp_pick: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/crypto/argon2/argon2.bend as Argon2 Lines 40-46 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=40&end_line=46 import Base import bend-collections@1.0.0.0/src/crypto/blake/blake2b/sized.bend as H def hp_pick(+tl: Nat, +x: List<&2, U32>, short: Bool) -> List<&2, U32>: match short: case True{}: H.hash(tl, x) case False{}: +r = Nat.sub(Nat.div(Nat.add(tl, 31n), 32n), 2n) hp_go(Nat.sub(r, 1n), H.hash(64n, x), Nat.sub(tl, Nat.mul(32n, r))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub 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=hp_go https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/crypto/blake/blake2b/sized.bend&name=hash