tendermint/crypto/
sha256.rs

1/// Length of a SHA256 hash in bytes.
2pub const HASH_SIZE: usize = 32;
3
4/// A SHA256 digest implementation.
5///
6/// This trait provides the most general possible interface that can be
7/// implemented by host functions in popular on-chain smart contract
8/// environments. As such, in can only do one-piece slice digests.
9pub trait Sha256 {
10    fn digest(data: impl AsRef<[u8]>) -> [u8; HASH_SIZE];
11}