tendermint::crypto::sha256

Trait Sha256

Source
pub trait Sha256 {
    // Required method
    fn digest(data: impl AsRef<[u8]>) -> [u8; 32];
}
Expand description

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.

Required Methods§

Source

fn digest(data: impl AsRef<[u8]>) -> [u8; 32]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§