Hmac.cr.hmac.block: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/hmac.bend as Hmac Lines 42-45 of bend-osdev-crypto@0.1.0.0/hmac.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/hmac.bend&start_line=42&end_line=45 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B # K0: the key (hashed if longer than bsize), zero-padded to bsize bytes def cr.hmac.block(~bsize: Nat, ~digest: B.Octets -> B.Octets, +key: B.Octets) -> List<&2, U32>: +k = cr.hmac.k0(~digest, Nat.is_lt(bsize, B.Octets.len(key)), key) B.append(B.Octets.to_list(k), B.zeros(Nat.sub(bsize, B.Octets.len(k)))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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-bytes@0.1.1.0/bytes.bend&name=append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=zeros https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/hmac.bend&name=cr.hmac.k0