def CrRc4.start
import bend-osdev-crypto@0.1.0.0/inst_rc4.bend as InstRc4import 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
20# the state for a key of 1 to 256 bytes (CrBadKeyLength otherwise); RC4 has
21# no IV, so the IV must be empty (CrBadIvLength otherwise)
22def CrRc4.start(key: B.Octets, iv: B.Octets) -> Result<&2, &2, Cr.CrError, R.LcRc4State>:
23 cr.rc4.start(B.Octets.len(iv), R.LcRc4.start(key))