#[non_exhaustive]pub enum Algorithm {
Sha1,
Sha256,
Sha224,
Sha512,
Sha384,
Md5,
}Expand description
The digest function used to turn the canonical form into a digest.
The default is SHA-1, which is what the reference package uses when no algorithm is named. The others are here so a digest can match a system that already speaks one of them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sha1
SHA-1, 40 hexadecimal characters. The reference’s default.
Sha256
SHA-256, 64 hexadecimal characters.
Sha224
SHA-224, 56 hexadecimal characters.
Sha512
SHA-512, 128 hexadecimal characters.
Sha384
SHA-384, 96 hexadecimal characters.
Md5
MD5, 32 hexadecimal characters.
Trait Implementations§
impl Copy for Algorithm
impl Eq for Algorithm
impl StructuralPartialEq for Algorithm
Auto Trait Implementations§
impl Freeze for Algorithm
impl RefUnwindSafe for Algorithm
impl Send for Algorithm
impl Sync for Algorithm
impl Unpin for Algorithm
impl UnsafeUnpin for Algorithm
impl UnwindSafe for Algorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more