def CrPbkdf2.stream
import bend-osdev-crypto@0.1.0.0/pbkdf2.bend as Pbkdf2import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
79# The first n bytes of the derived key, under a prepared key k (the MAC's,
80# from the password) and an iteration count c of at least 1, without the
81# checks: T_1 || T_2 || ... cut to n bytes
82def CrPbkdf2.stream(~K: Data, ~compute: K -> B.Octets -> B.Octets, k: K, salt: B.Octets, c: U32, n: Nat) -> B.Octets:
83 B.Octets.of_list(cr.pbkdf2.out(~K, ~compute, n, Nil{}, k, salt, Nat.sub(U32.to_nat(c), 1n), 0))