Pbkdf2.cr.pbkdf2.chain: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/pbkdf2.bend as Pbkdf2 Lines 37-44 of bend-osdev-crypto@0.1.0.0/pbkdf2.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/pbkdf2.bend&start_line=37&end_line=44 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B # acc xor U_(j+1) xor ... for c more iterations, u = U_j def cr.pbkdf2.chain(~K: Data, ~compute: K -> B.Octets -> B.Octets, c: Nat, +k: K, u: B.Octets, acc: List<&2, U32>) -> List<&2, U32>: match c: case 0n: acc case 1n+p: +u2 = compute(k, u) cr.pbkdf2.chain(~K, ~compute, p, k, u2, cr.pbkdf2.xor(acc, B.Octets.to_list(u2))) Uses (6): 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.to_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pbkdf2.bend&name=cr.pbkdf2.xor