def digest

bend-collections@1.0.0.0 · src/crypto/sha/packed/buffer.bend:5

import bend-collections@1.0.0.0/src/crypto/sha/packed/buffer.bend as Buffer
import Base
import bend-collections@1.0.0.0/src/crypto/sha/state.bend as S

5# Exactly eight big-endian U32 words (32 bytes), with no list allocation.
6def digest(s: S.State) -> Array<U32>:
7  match s:
8    case S.H{a,b,c,d,e,f,g,h}:
9      ANode{ANode{ANode{ALeaf{a},ALeaf{b}},ANode{ALeaf{c},ALeaf{d}}},ANode{ANode{ALeaf{e},ALeaf{f}},ANode{ALeaf{g},ALeaf{h}}}}

Uses (3)

Used by (4)