Enum mhash::MultiHashVariant [] [src]

pub enum MultiHashVariant {
    Identity,
    Sha1,
    Sha2_256,
    Sha2_512,
    Sha3_512,
    Sha3_384,
    Sha3_256,
    Sha3_224,
    Shake128,
    Shake256,
    Blake2B,
    Blake2S,
    ApplicationSpecific {
        code: usize,
    },
    // some variants omitted
}

The possible multihash variants.

Variants

A straight copy of the data supposedly hashed. May be a prefix rather than a full copy.

A 160-bit SHA-1 digest.

A 256-bit SHA-2 digest.

A 512-bit SHA-2 digest.

A 512-bit SHA-3 digest.

A 384-bit SHA-3 digest.

A 256-bit SHA-3 digest.

A 224-bit SHA-3 digest.

A variable size SHAKE-128 digest.

A variable size SHAKE-256 digest.

A 512-bit BLAKE2b digest.

A 256-bit BLAKE2s digest.

An application specific MultiHash variant.

Fields of ApplicationSpecific

The application specific code for this variant, must be in the range [0x0400, 0x040f].

Methods

impl MultiHashVariant
[src]

Returns the multihash variant that the given code refers to, validates that the code is known or an application specific variant.

Returns the multihash variant that the given code refers to, validates that the code is known or an application specific variant, and that the length is consistent with the multihash variant the code refers to.

Validates that the length is consistent with this multihash variant.

The maximum digest length allowed for this multihash variant.

The code specifying this multihash variant.

The string representation of this multihash type.

Trait Implementations

impl Debug for MultiHashVariant
[src]

Formats the value using the given formatter.

impl Eq for MultiHashVariant
[src]

impl PartialEq for MultiHashVariant
[src]

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

This method tests for !=.

impl Clone for MultiHashVariant
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for MultiHashVariant
[src]

impl Hash for MultiHashVariant
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more