def sha256
import bend-collections@1.0.0.0/src/crypto/sha/packed/sha256.bend as Sha256import Base
import bend-collections@1.0.0.0/src/crypto/sha/packed/buffer.bend as Buffer
4# Sole production hash API. Packed input and output, four bytes per U32,
5# big-endian. Consumes input; returns exactly eight words, or None for an
6# oversized byte length. No byte-list or digest-list compatibility API.
7def sha256(words: Array<U32>, byte_length: Nat) -> Maybe<&1,Array<U32>>:
8 Buffer.sha256(words,byte_length)