Seqiv.AdSeqiv.iv: def of bend-osdev-aead@0.1.0.0 Import: import bend-osdev-aead@0.1.0.0/seqiv.bend as Seqiv Lines 39-44 of bend-osdev-aead@0.1.0.0/seqiv.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-aead@0.1.0.0/seqiv.bend&start_line=39&end_line=44 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-crypto@0.1.0.0/octets.bend as O # The IV of sequence number seq (big-endian bytes, at most as long as the # salt): the salt XOR seq, right-aligned def AdSeqiv.iv(~KA: Data, k: AdSeqivKey, +seq: B.Octets) -> B.Octets: match k: case AdSeqivKey{ka, +salt}: O.CrOct.xor(salt, B.Octets.append(B.Octets.zeros(Nat.sub(B.Octets.len(salt), B.Octets.len(seq))), seq)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-osdev-aead@0.1.0.0/seqiv.bend&name=AdSeqivKey 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.append 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.zeros https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/octets.bend&name=CrOct.xor