Cast5.LcCast5.key: def of bend-osdev-legacy-ciphers@0.1.0.0 Import: import bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend as Cast5 Lines 508-512 of bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend&start_line=508&end_line=512 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 # a key of 5 to 16 bytes (40 to 128 bits); up to 10 bytes, 12 rounds def LcCast5.key(o: B.Octets) -> Result<&2, &2, L.LcError, LcCast5Key>: +xs = B.Octets.to_list(o) +n = B.len(xs) cast5.key.pick(Bool.and(Nat.is_le(5n, n), Nat.is_le(n, 16n)), n, xs) Uses (9): 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=Result 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.to_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=len https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend&name=LcCast5Key https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend&name=cast5.key.pick https://jend.leeeet.dev/definition.txt?path=bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend&name=LcError