def finish256

bend-collections@1.0.0.0 · src/crypto/hash.bend:199

import bend-collections@1.0.0.0/src/crypto/hash.bend as Hash
import Base
import bend-collections@1.0.0.0/src/crypto/sha/core.bend as C256
import bend-collections@1.0.0.0/src/crypto/sha/sha256.bend as SHA256

199def finish256(st: Sha256State, +len: Nat, +q: Nat) -> List<&2, U32>:
200  match st:
201    case St256{s, buf}:
202      SHA256.digest_bytes(C256.digest(C256.block_bytes(List.append(&2, U32, buf, C256.suffix(len)), q, C256.round_constants(), s)))

Uses (10)

Used by (1)