pub trait DigestState {
// Required methods
fn update(&mut self, data: &[u8]) -> Result<(), ProviderError>;
fn finalize(self: Box<Self>) -> Result<Vec<u8>, ProviderError>;
}Expand description
Incremental message digest owned by one provider operation.
Input is absorbed in order across any number of update
calls; finalize consumes the state. A provider may
serialize its other operations while a state is live, so callers finish a
digest before starting another operation on the same provider.
This is the backend interface of the selected provider (runtime backend,
FIPS selection, token sessions), not a cross-product contract: the shared
streaming digest callbacks of the signature-primitives packages are
implemented by adapters on top of it.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".