law oneshot256
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/hash/proof.bend:40
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/hash/proof.bend as Proof
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/core.bend as C256
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/sha256.bend as SHA256
import bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend as Hash
40
41
42law oneshot256:
43 for +m: List<&2, U32>
44 {Hash.sha256(m) == SHA256.digest_bytes(C256.digest(C256.block_bytes(List.append(&2, U32, m,
45 C256.suffix(List.length(&2, U32, m))), 48n, C256.round_constants(), C256.initial()))) : List<&2, U32>}