pub trait ShaAlgorithm: Sealed {
const ALGORITHM: &'static str;
const CHUNK_LENGTH: usize;
const DIGEST_LENGTH: usize;
}
Available on crate feature
unstable
only.Expand description
This trait encapsulates the configuration for a specific SHA algorithm.
Required Associated Constants§
Sourceconst CHUNK_LENGTH: usize
const CHUNK_LENGTH: usize
The length of the chunk that the algorithm processes at a time.
For example, in SHA-256, this would typically be 64 bytes.
Sourceconst DIGEST_LENGTH: usize
const DIGEST_LENGTH: usize
The length of the resulting digest produced by the algorithm.
For example, in SHA-256, this would be 32 bytes.
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.