Rc4.LcRc4.start: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend as Rc4 Lines 180-184 of bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend&start_line=180&end_line=184 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L # the state after the key-scheduling algorithm, for a key of 1 to 256 bytes def LcRc4.start(key: B.Octets) -> Result<&2, &2, L.LcError, LcRc4State>: +xs = B.Octets.to_list(key) +n = B.len(xs) rc4.start.pick(Bool.and(Nat.is_lt(0n, n), Nat.is_le(n, 256n)), xs, n) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.to_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=len https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend&name=LcError https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend&name=LcRc4State https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend&name=rc4.start.pick