pub trait ShaAlgorithm: Sealed {
    const ALGORITHM: &'static str;
    const ALGORITHM_KIND: ShaAlgorithmKind;
    const CHUNK_LENGTH: usize;
    const DIGEST_LENGTH: usize;
}Expand description
This trait encapsulates the configuration for a specific SHA algorithm.
Required Associated Constants§
Sourceconst ALGORITHM_KIND: ShaAlgorithmKind
 
const ALGORITHM_KIND: ShaAlgorithmKind
Constant containing the kind of the algorithm.
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.
Implementors§
Source§impl ShaAlgorithm for Sha1
Available on crate feature unstable only. 
impl ShaAlgorithm for Sha1
Available on crate feature 
unstable only.const ALGORITHM: &'static str = "Sha1"
const ALGORITHM_KIND: ShaAlgorithmKind = ShaAlgorithmKind::Sha1
const CHUNK_LENGTH: usize = 64usize
const DIGEST_LENGTH: usize = 20usize
Source§impl ShaAlgorithm for Sha224
Available on crate feature unstable only. 
impl ShaAlgorithm for Sha224
Available on crate feature 
unstable only.const ALGORITHM: &'static str = "Sha224"
const ALGORITHM_KIND: ShaAlgorithmKind = ShaAlgorithmKind::Sha224
const CHUNK_LENGTH: usize = 64usize
const DIGEST_LENGTH: usize = 28usize
Source§impl ShaAlgorithm for Sha256
Available on crate feature unstable only. 
impl ShaAlgorithm for Sha256
Available on crate feature 
unstable only.