Enum cryptographic_message_syntax::SignatureAlgorithm[][src]

pub enum SignatureAlgorithm {
    Sha1Rsa,
    Sha256Rsa,
    RsaesPkcsV15,
    EcdsaSha256,
    Ed25519,
}

An algorithm used to digitally sign content.

Instances can be converted to/from the underlying ASN.1 type and OIDs.

Variants

Sha1Rsa

SHA-1 with RSA encryption.

Corresponds to OID 1.2.840.113549.1.1.5.

Sha256Rsa

SHA-256 with RSA encryption.

Corresponds to OID 1.2.840.113549.1.1.11.

RsaesPkcsV15

RSAES-PKCS1-v1_5 encryption scheme.

Corresponds to OID 1.2.840.113549.1.1.1.

EcdsaSha256

ECDSA with SHA-256.

Corresponds to OID 1.2.840.10045.4.3.2.

Ed25519

ED25519

Corresponds to OID 1.3.101.112.

Implementations

impl SignatureAlgorithm[src]

pub fn as_verification_algorithm(&self) -> &'static dyn VerificationAlgorithm[src]

Convert this algorithm into a verification algorithm.

This enables you to easily obtain a ring signature verified based on the type of algorithm.

Trait Implementations

impl Clone for SignatureAlgorithm[src]

impl Copy for SignatureAlgorithm[src]

impl Debug for SignatureAlgorithm[src]

impl Eq for SignatureAlgorithm[src]

impl From<&'_ SigningKey> for SignatureAlgorithm[src]

impl From<SignatureAlgorithm> for SignatureAlgorithmIdentifier[src]

impl PartialEq<SignatureAlgorithm> for SignatureAlgorithm[src]

impl StructuralEq for SignatureAlgorithm[src]

impl StructuralPartialEq for SignatureAlgorithm[src]

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

type Error = CmsError

The type returned in the event of a conversion error.

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

type Error = CmsError

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument 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.