[][src]Enum sequoia_openpgp::crypto::mpis::Signature

pub enum Signature {
    RSA {
        s: MPI,
    },
    DSA {
        r: MPI,
        s: MPI,
    },
    Elgamal {
        r: MPI,
        s: MPI,
    },
    EdDSA {
        r: MPI,
        s: MPI,
    },
    ECDSA {
        r: MPI,
        s: MPI,
    },
    Unknown {
        mpis: Box<[MPI]>,
        rest: Box<[u8]>,
    },
}

Holds a signature.

Provides a typed and structured way of storing multiple MPIs in packets.

Variants

RSA

RSA signature.

Fields of RSA

s: MPI

Signature m^d mod N.

DSA

NIST's DSA signature.

Fields of DSA

r: MPI

r value.

s: MPI

s value.

Elgamal

Elgamal signature.

Fields of Elgamal

r: MPI

r value.

s: MPI

s value.

EdDSA

DJB's "Twisted" Edwards curve DSA signature.

Fields of EdDSA

r: MPI

r value.

s: MPI

s value.

ECDSA

NIST's Elliptic curve DSA signature.

Fields of ECDSA

r: MPI

r value.

s: MPI

s value.

Unknown

Unknown number of MPIs for an unknown algorithm.

Fields of Unknown

mpis: Box<[MPI]>

The successfully parsed MPIs.

rest: Box<[u8]>

Any data that failed to parse.

Implementations

impl Signature[src]

pub fn serialized_len(&self) -> usize[src]

Number of octets all MPIs of this instance occupy when serialized.

impl Signature[src]

pub fn parse<T: AsRef<[u8]>>(algo: PublicKeyAlgorithm, buf: T) -> Result<Self>[src]

Parses a set of OpenPGP MPIs representing a signature.

Expects MPIs for a public key algorithm algos signature. See Section 3.2 of RFC 4880 for details.

Trait Implementations

impl Arbitrary for Signature[src]

impl Clone for Signature[src]

impl Debug for Signature[src]

impl Eq for Signature[src]

impl Hash for Signature[src]

fn hash(&self, hash: &mut Context)[src]

Update the Hash with a hash of the MPIs.

impl Hash for Signature[src]

impl Ord for Signature[src]

impl PartialEq<Signature> for Signature[src]

impl PartialOrd<Signature> for Signature[src]

impl Serialize for Signature[src]

impl SerializeInto for Signature[src]

impl StructuralEq for Signature[src]

impl StructuralPartialEq for Signature[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,