pub trait Hashable {
// Required method
fn update_hash<S: Digest>(&self, state: &mut S);
// Provided methods
fn update_hash_slice<S>(slice: &[Self], state: &mut S)
where S: Digest,
Self: Sized { ... }
fn hash_with<H>(&self) -> Hash
where H: Digest<OutputSize = U32> { ... }
fn hash(&self) -> Hash { ... }
}
Expand description
Similar to std::hash::Hash, but for cryptographic hashes.
Required Methods§
fn update_hash<S: Digest>(&self, state: &mut S)
Provided Methods§
fn update_hash_slice<S>(slice: &[Self], state: &mut S)
fn hash_with<H>(&self) -> Hash
fn hash(&self) -> Hash
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.