def CrSha2.final
import bend-osdev-crypto@0.1.0.0/inst_sha2.bend as InstSha2import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend as Hc
37# the digest of the bytes so far
38def CrSha2.final(s: CrSha2State) -> B.Octets:
39 match s:
40 case CrSha2State{h}:
41 B.Octets.of_list(Hc.digest(h))