def rc4
bend-osdev-crypto@0.1.0.0 · check.bend:214
import bend-osdev-crypto@0.1.0.0/check.bend as Check
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend as R
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/stream.bend as St
import bend-osdev-crypto@0.1.0.0/inst_rc4.bend as RC
214
215def rc4(+k: B.Octets, n: Nat) -> Result<&2, &2, Cr.CrError, B.Octets>:
216 St.CrStream.crypt(~R.LcRc4State, ~R.LcRc4Out, ~RC.CrRc4.start, ~R.LcRc4.update, ~R.LcRc4.out_data, k, B.Octets.empty(), B.Octets.zeros(n))