pub trait Digest {
const NAME: &'static str;
// Required methods
fn digest(&mut self, input: &[u8]) -> String;
fn update(&mut self, input: &[u8]);
fn verify(&mut self, encoded: &str) -> bool;
}
Expand description
Describes computing message digests for arbitrary bytes
This trait has notable implementations such as apub-openssl’s OpenSslDigest, and apub-rustcrypto’s Sha256Digest
Required Associated Constants§
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.