Enum x509_certificate::algorithm::DigestAlgorithm[][src]

pub enum DigestAlgorithm {
    Sha1,
    Sha256,
    Sha384,
    Sha512,
}
Expand description

A hashing algorithm used for digesting data.

Instances can be converted to and from Oid via From/Into implementations.

They can also be converted to and from The ASN.1 AlgorithmIdentifier, which is commonly used to represent them in X.509 certificates.

Instances can be converted into a digest::Context capable of computing digests via From/Into.

Variants

Sha1

SHA-1.

Corresponds to OID 1.3.14.3.2.26.

Sha256

SHA-256.

Corresponds to OID 2.16.840.1.101.3.4.2.1.

Sha384

SHA-384.

Corresponds to OID 2.16.840.1.101.3.4.2.2.

Sha512

SHA-512.

Corresponds to OID 2.16.840.1.101.3.4.2.3.

Implementations

Obtain an object that can be used to digest content using this algorithm.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

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

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.