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]
impl<'a> SignedDataBuilder<'a>
[src]pub fn signed_content(self, data: Vec<u8>) -> Self
[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]
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(self, cert: CapturedX509Certificate) -> Self
[src]
pub fn certificate(self, cert: CapturedX509Certificate) -> Self
[src]Add a certificate defined by our crate’s Certificate type.
pub fn certificates(
self,
certs: impl Iterator<Item = CapturedX509Certificate>
) -> Self
[src]
pub fn certificates(
self,
certs: impl Iterator<Item = CapturedX509Certificate>
) -> Self
[src]Add multiple certificates to the certificates chain.
pub fn content_type(self, oid: Oid) -> Self
[src]
pub fn content_type(self, oid: Oid) -> Self
[src]Force the OID for the ContentInfo.contentType
field.
pub fn build_der(&self) -> Result<Vec<u8>, CmsError>
[src]
pub fn build_der(&self) -> Result<Vec<u8>, CmsError>
[src]Construct a DER-encoded ASN.1 document containing a SignedData
object.
RFC 5652 says SignedData
is BER encoded. However, DER is a stricter subset
of BER. DER encodings are valid BER. So producing DER encoded data is perfectly
valid. We choose to go with the more well-defined encoding format.
Trait Implementations
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]