def aria.key.pick
bend-osdev-legacy-ciphers@0.1.0.0 · aria.bend:4595
import bend-osdev-legacy-ciphers@0.1.0.0/aria.bend as Aria
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
4595def aria.key.pick(ok: Bool, n16: Bool, n24: Bool, +n: Nat, +xs: List<&2, U32>) -> Result<&2, &2, L.LcError, LcAriaKey>:
4596 match ok:
4597 case True{}:
4598 Done{aria.key(n16, n24, B.append(xs, B.zeros(Nat.sub(32n, n))))}
4599 case False{}:
4600 Fail{L.LcBadKeyLength{n}}