Struct cryptographic_message_syntax::SignedDataBuilder[][src]

pub struct SignedDataBuilder<'a> { /* fields omitted */ }

Entity for incrementally deriving a SignedData primitive.

Use this type for generating an RFC 5652 payload for signed data.

Implementations

impl<'a> SignedDataBuilder<'a>[src]

pub fn signed_content(self, data: Vec<u8>) -> Self[src]

Define the content to sign.

This content will be embedded in the generated payload.

pub fn signer(self, signer: SignerBuilder<'a>) -> Self[src]

Add a signer.

The signer is the thing generating the cryptographic signature over data to be signed.

pub fn certificate_asn1(self, cert: Certificate) -> Self[src]

Add a certificate as defined by parsed ASN.1.

pub fn certificate(self, cert: Certificate) -> Result<Self, CmsError>[src]

Add a certificate defined by our crate’s Certificate type.

pub fn certificates(
    self,
    certs: impl Iterator<Item = Certificate>
) -> Result<Self, CmsError>
[src]

Add multiple certificates to the certificates chain.

pub fn build_ber(&self) -> Result<Vec<u8>, CmsError>[src]

Construct a BER-encoded ASN.1 document containing a SignedData object.

Trait Implementations

impl<'a> Default for SignedDataBuilder<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SignedDataBuilder<'a>

impl<'a> Send for SignedDataBuilder<'a>

impl<'a> Sync for SignedDataBuilder<'a>

impl<'a> Unpin for SignedDataBuilder<'a>

impl<'a> UnwindSafe for SignedDataBuilder<'a>

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, 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.