def LcTdes.key
import bend-osdev-legacy-ciphers@0.1.0.0/tdes.bend as Tdesimport 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
48# option 1 for 24 bytes, option 2 for 16
49def LcTdes.key(o: B.Octets) -> Result<&2, &2, L.LcError, LcTdesKey>:
50 +xs = B.Octets.to_list(o)
51 +n = B.len(xs)
52 tdes.key.pick(Nat.is_eq(n, 24n), Nat.is_eq(n, 16n), xs)