def LcSm4.key
import bend-osdev-legacy-ciphers@0.1.0.0/sm4.bend as Sm4import 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
130# a 16-byte key
131def LcSm4.key(o: B.Octets) -> Result<&2, &2, L.LcError, LcSm4Key>:
132 +xs = B.Octets.to_list(o)
133 sm4.key.pick(Nat.is_eq(B.len(xs), 16n), xs)