#[non_exhaustive]pub enum ChecksumAlgorithm {
Sha1,
Sha256,
Sha384,
Sha512,
Sha3_256,
Sha3_384,
Sha3_512,
Blake2b256,
Blake2b384,
Blake2b512,
Blake3,
Other(String),
}Expand description
checksum-type: the algorithm of a declared checksum.
Unknown wire values are kept in Self::Other.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sha1
The "SHA-1" wire value.
Sha256
The "SHA-256" wire value.
Sha384
The "SHA-384" wire value.
Sha512
The "SHA-512" wire value.
Sha3_256
The "SHA3-256" wire value.
Sha3_384
The "SHA3-384" wire value.
Sha3_512
The "SHA3-512" wire value.
Blake2b256
The "BLAKE2b-256" wire value.
Blake2b384
The "BLAKE2b-384" wire value.
Blake2b512
The "BLAKE2b-512" wire value.
Blake3
The "BLAKE3" wire value.
Other(String)
A value this client does not recognize.
Implementations§
Source§impl ChecksumAlgorithm
impl ChecksumAlgorithm
Sourcepub fn digest_len(&self) -> Option<usize>
pub fn digest_len(&self) -> Option<usize>
Digest size in bytes for algorithms listed in checksum-type.
Sourcepub fn is_weak(&self) -> bool
pub fn is_weak(&self) -> bool
Whether this algorithm is too weak for a match to count as
crate::IntegrityOutcome::Verified on its own.
SHA-1 is listed in the pinned checksum-type enum but is not
collision resistant. MD5 is not in that enum; it is parsed as
Self::Other, never computed, and also reported as weak.