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§
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.