def LcCamellia.key
import bend-osdev-legacy-ciphers@0.1.0.0/camellia.bend as Camelliaimport 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
331# a 16-, 24- or 32-byte key (Camellia-128, -192, -256, by its length)
332def LcCamellia.key(o: B.Octets) -> Result<&2, &2, L.LcError, LcCamelliaKey>:
333 +xs = B.Octets.to_list(o)
334 +n = B.len(xs)
335 cam.key.pick(Nat.is_eq(n, 16n), Nat.is_eq(n, 24n), Nat.is_eq(n, 32n), xs)