pub trait FingerprintHasher {
type Error;
// Required methods
fn algorithm(&self) -> DigestAlgorithm;
fn digest(
&self,
input: &[u8],
output: &mut [u8],
) -> Result<usize, Self::Error>;
}Expand description
Caller-provided collision-resistant fingerprint digest implementation.
Implementations must compute the declared algorithm over exactly input.
Ordinary Hash, CRC, and other non-cryptographic digests do not satisfy
this security contract.
Required Associated Types§
Required Methods§
Sourcefn algorithm(&self) -> DigestAlgorithm
fn algorithm(&self) -> DigestAlgorithm
Returns the collision-resistant algorithm implemented by this value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".