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

SHA2-256

SHA2-512

SHA3-256

SHA3-512

MD6-128

MD6-256

MD6-512

Methods

impl Algorithm
[src]

Length, in bytes, of the algorithm's output hex string

Trait Implementations

impl Debug for Algorithm
[src]

Formats the value using the given formatter.

impl Clone for Algorithm
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Algorithm
[src]

impl Hash for Algorithm
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl PartialEq for Algorithm
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Algorithm
[src]

impl FromStr for Algorithm
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more