law hmac_sha1_streaming

bend-osdev-crypto@0.1.0.0 · LAWS.bend:1333

import bend-osdev-crypto@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-crypto@0.1.0.0/hmac.bend as Hm
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs
import bend-osdev-hashes@0.1.0.0/sha1.bend as HS1

1333# HMAC over SHA-1 (hashes): the state after a ++ b is the state after a, then b
1334law hmac_sha1_streaming:
1335  for s: Hm.CrHmacState<Hs.HsMdState<Hs.HsW5>>
1336  for +a: B.Octets
1337  for +b: B.Octets
1338  {Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.update, s, B.Octets.append(a, b)) == Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.update, Hm.CrHmac.update(~Hs.HsMdState<Hs.HsW5>, ~HS1.HsSha1.update, s, a), b) : Hm.CrHmacState<Hs.HsMdState<Hs.HsW5>>}

Uses (8)

Used by (0)

No other definition uses this definition.