Hmac.hmac: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend as Hmac Lines 54-58 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&start_line=54&end_line=58 import Base # HMAC(K, text) = H((K0 ^ opad) || H((K0 ^ ipad) || text)) (steps 4-9). def hmac(+key: List<&2, U32>, text: List<&2, U32>) -> List<&2, U32>: +k = k0(key) hash(List.append(&2, U32, xor_pad(k, opad()), hash(List.append(&2, U32, xor_pad(k, ipad()), text)))) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&name=hash https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&name=ipad https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&name=k0 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&name=opad https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/hmac.bend&name=xor_pad