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

pub enum DigestAlgorithm {
    Sha256,
    Sha512,
}

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

Sha256

SHA-256.

Corresponds to OID 2.16.840.1.101.3.4.2.1.

Sha512

SHA-512.

Corresponds to OID 2.16.840.1.101.3.4.2.3.

Implementations

impl DigestAlgorithm[src]

pub fn digester(&self) -> Context[src]

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

Trait Implementations

impl Clone for DigestAlgorithm[src]

impl Copy for DigestAlgorithm[src]

impl Debug for DigestAlgorithm[src]

impl Eq for DigestAlgorithm[src]

impl From<DigestAlgorithm> for AlgorithmIdentifier[src]

impl Hash for DigestAlgorithm[src]

impl PartialEq<DigestAlgorithm> for DigestAlgorithm[src]

impl StructuralEq for DigestAlgorithm[src]

impl StructuralPartialEq for DigestAlgorithm[src]

impl TryFrom<&'_ AlgorithmIdentifier> for DigestAlgorithm[src]

type Error = Error

The type returned in the event of a conversion error.

impl TryFrom<&'_ Oid<Bytes>> for DigestAlgorithm[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.