Pbkdf2.CrPbkdf2.stream: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/pbkdf2.bend as Pbkdf2 Lines 79-83 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=79&end_line=83 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B # The first n bytes of the derived key, under a prepared key k (the MAC's, # from the password) and an iteration count c of at least 1, without the # checks: T_1 || T_2 || ... cut to n bytes def CrPbkdf2.stream(~K: Data, ~compute: K -> B.Octets -> B.Octets, k: K, salt: B.Octets, c: U32, n: Nat) -> B.Octets: B.Octets.of_list(cr.pbkdf2.out(~K, ~compute, n, Nil{}, k, salt, Nat.sub(U32.to_nat(c), 1n), 0)) Uses (8): 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.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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.of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/pbkdf2.bend&name=cr.pbkdf2.out