def checked
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/packed/packed.bend as Packedimport Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/state.bend as S
179def checked(valid: Bool, a: Array<U32>, length: Nat) -> Maybe<&2,S.State>:
180 match valid:
181 case False{}: None{}
182 case True{}: Some{hash_unchecked(a,length)}