def fold512

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/hash/incremental.bend:583

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/hash/incremental.bend as Incremental
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend as H

583# The state after each chunk in turn.
584def fold512(cs: List<&2, List<&2, U32>>, +q: Nat, st: H.Sha512State) -> H.Sha512State:
585  match cs:
586    case Nil{}:
587      st
588    case c <> ct:
589      fold512(ct, q, H.step512(st, c, q))

Uses (5)

Used by (3)