Check.round: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/check.bend as Check Lines 163-169 of bend-osdev-crypto@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/check.bend&start_line=163&end_line=169 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr # the last 16 bytes of c, and whether d gave the message back def round(+m: B.Octets, c: Result<&2, &2, Cr.CrError, B.Octets>, d: Result<&2, &2, Cr.CrError, B.Octets>) -> String: match c d: case Done{+x} Done{y}: ok_if(B.Octets.is_eq(y, m), B.Octets.drop(Nat.sub(B.Octets.len(x), 16n), x)) case _ _: "failed" Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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.drop https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.is_eq 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-crypto@0.1.0.0/check.bend&name=ok_if https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/crypto.bend&name=CrError