Enum checksums::Algorithm
[−]
[src]
pub enum Algorithm { SHA1, SHA2256, SHA2512, SHA3256, SHA3512, BLAKE, BLAKE2, CRC64, CRC32, CRC16, CRC8, MD5, MD6128, MD6256, MD6512, XOR8, }
A hashing algorithm.
Examples
assert_eq!(checksums::Algorithm::from_str("SHA1"), Ok(checksums::Algorithm::SHA1)); assert_eq!(checksums::Algorithm::from_str("SHA-1"), Ok(checksums::Algorithm::SHA1)); assert_eq!(checksums::Algorithm::from_str("SHA2"), Ok(checksums::Algorithm::SHA2512)); assert_eq!(checksums::Algorithm::from_str("SHA-2"), Ok(checksums::Algorithm::SHA2512)); assert_eq!(checksums::Algorithm::from_str("BLAKE"), Ok(checksums::Algorithm::BLAKE)); assert_eq!(checksums::Algorithm::from_str("BLAKE2"), Ok(checksums::Algorithm::BLAKE2)); assert_eq!(checksums::Algorithm::from_str("MD5"), Ok(checksums::Algorithm::MD5));
Variants
SHA1
SHA2256
SHA2-256
SHA2512
SHA2-512
SHA3256
SHA3-256
SHA3512
SHA3-512
BLAKE
BLAKE2
CRC64
CRC32
CRC16
CRC8
MD5
MD6128
MD6-128
MD6256
MD6-256
MD6512
MD6-512
XOR8
Methods
impl Algorithm
[src]
Trait Implementations
impl Debug for Algorithm
[src]
impl Clone for Algorithm
[src]
fn clone(&self) -> Algorithm
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Algorithm
[src]
impl Hash for Algorithm
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl PartialEq for Algorithm
[src]
fn eq(&self, __arg_0: &Algorithm) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.