Vmac.cr.vm.mac: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/vmac.bend as Vmac Lines 457-460 of bend-osdev-crypto@0.1.0.0/vmac.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/vmac.bend&start_line=457&end_line=460 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B # As a MAC: the nonce is the message's first nlen bytes (1 to bsize - 1), # the data the rest; a message too short for its nonce has the empty tag def cr.vm.mac(~K: Data, ~Blk: Data, ~bsize: Nat, ~enc: K -> Blk -> Blk, ~blk_of: B.Octets -> Maybe<&2, Blk>, ~blk_to: Blk -> B.Octets, ~nlen: Nat, kk: CrVmacKey, +m: B.Octets) -> B.Octets: cr.vm.or_empty(CrVmac.tag(~K, ~Blk, ~bsize, ~enc, ~blk_of, ~blk_to, kk, B.Octets.take(nlen, m), B.Octets.drop(nlen, m))) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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.take https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/vmac.bend&name=CrVmac.tag https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/vmac.bend&name=CrVmacKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/vmac.bend&name=cr.vm.or_empty