Aes.CmAes.key: def of bend-osdev-aes@0.1.0.0 Import: import bend-osdev-aes@0.1.0.0/aes.bend as Aes Lines 216-220 of bend-osdev-aes@0.1.0.0/aes.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-aes@0.1.0.0/aes.bend&start_line=216&end_line=220 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M # a 16-byte (AES-128) or 32-byte (AES-256) key def CmAes.key(o: B.Octets) -> Result<&2, &2, M.CmError, CmAesKey>: +xs = B.Octets.to_list(o) +n = B.len(xs) aes.key.pick(Bool.or(Nat.is_eq(n, 16n), Nat.is_eq(n, 32n)), xs) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-osdev-aes@0.1.0.0/aes.bend&name=CmAesKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-aes@0.1.0.0/aes.bend&name=aes.key.pick 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-mode-core@0.1.0.0/mode_core.bend&name=CmError