Struct cryptographic_message_syntax::SignedData[][src]

pub struct SignedData { /* fields omitted */ }

Represents a CMS SignedData structure.

This is the high-level type representing a CMS signature of some data. It contains a description of what was signed, the cryptographic signature of what was signed, and likely the X.509 certificate chain for the signing key.

This is a high-level data structure that ultimately gets (de)serialized from/to ASN.1. It exists to facilitate common interactions with the low-level ASN.1 without exposing the complexity of ASN.1.

Implementations

impl SignedData[src]

pub fn parse_ber(data: &[u8]) -> Result<Self, CmsError>[src]

Construct an instance by parsing BER data.

pub fn message_digest_with_algorithm(&self, alg: DigestAlgorithm) -> Digest[src]

Compute the digest of the encapsulated content using a specified algorithm.

The returned value is likely used as the message-digest attribute type for use within signed attributes.

You can get the raw bytes of the digest by calling its .as_ref().

pub fn signed_content(&self) -> Option<&[u8]>[src]

Obtain encapsulated content that was signed.

This is the defined encapContentInfo cContent value.

pub fn certificates(&self) -> Box<dyn Iterator<Item = &Certificate>>[src]

pub fn signers(&self) -> impl Iterator<Item = &SignerInfo>[src]

Obtain signing information attached to this instance.

Each iterated value represents an entity that cryptographically signed the content. Use these objects to validate the signed data.

Trait Implementations

impl Clone for SignedData[src]

impl Debug for SignedData[src]

impl TryFrom<&'_ SignedData> for SignedData[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<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.