tendermint 0.40.4

Tendermint is a high-performance blockchain consensus engine that powers Byzantine fault tolerant applications written in any programming language. This crate provides core types for representing information about Tendermint blockchain networks, including chain information types, secret connections, and remote procedure calls (JSON-RPC).
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Length of a SHA256 hash in bytes.
pub const HASH_SIZE: usize = 32;

/// A SHA256 digest implementation.
///
/// This trait provides the most general possible interface that can be
/// implemented by host functions in popular on-chain smart contract
/// environments. As such, in can only do one-piece slice digests.
pub trait Sha256 {
    fn digest(data: impl AsRef<[u8]>) -> [u8; HASH_SIZE];
}