pub trait HashUtils<U: AsRef<[u8]>> {
// Required methods
fn hash_empty(self) -> U;
fn hash_leaf<T>(self, bytes: &T) -> U
where T: Hashable;
fn hash_nodes<T>(self, left: &T, right: &T) -> U
where T: Hashable;
}
Expand description
The sole purpose of this trait is to extend the standard
ring::algo::Algorithm
type with a couple utility functions.
Required Methods§
Sourcefn hash_empty(self) -> U
fn hash_empty(self) -> U
Compute the hash of the empty string
Sourcefn hash_nodes<T>(self, left: &T, right: &T) -> Uwhere
T: Hashable,
fn hash_nodes<T>(self, left: &T, right: &T) -> Uwhere
T: Hashable,
Compute the hash of the concatenation of left
and right
.
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.