def update
bend-collections@1.0.0.0 · src/crypto/hash.bend:516
import bend-collections@1.0.0.0/src/crypto/hash.bend as Hash
import Base
516def update(h: Hasher, +bytes: List<&2, U32>) -> Hasher:
517 match h:
518 case Sha256H{st, len}:
519 Sha256H{step256(st, bytes, 48n), Nat.add(len, List.length(&2, U32, bytes))}
520 case Sha512H{st, len}:
521 Sha512H{step512(st, bytes, 64n), Nat.add(len, List.length(&2, U32, bytes))}
522 case Sha3H{st, len}:
523 Sha3H{step3(st, bytes, 24n), Nat.add(len, List.length(&2, U32, bytes))}