Gf128.Gf128.of_octets: def of bend-osdev-gf@0.1.1.0 Import: import bend-osdev-gf@0.1.1.0/gf128.bend as Gf128 Lines 68-71 of bend-osdev-gf@0.1.1.0/gf128.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-gf@0.1.1.0/gf128.bend&start_line=68&end_line=71 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B # the block of 16 bytes (any other length is refused) def Gf128.of_octets(+o: B.Octets) -> Result<&2, &2, Gf128Error, Gf128>: +n = B.Octets.len(o) gf128.of_list.pick(Nat.is_eq(n, 16n), n, B.Octets.to_list(o)) Uses (8): 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-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.len 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-gf@0.1.1.0/gf128.bend&name=Gf128 https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gf128.bend&name=Gf128Error https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gf128.bend&name=gf128.of_list.pick