Windows Secure Mime ContextEncapsulated Sign Async(Cms Signer, Stream, Cancellation Token) Method
Asynchronously sign and encapsulate the content using the specified signer.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
A new ApplicationPkcs7Mime instance containing the detached signature data.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override Task<ApplicationPkcs7Mime> EncapsulatedSignAsync(
CmsSigner signer,
Stream content,
CancellationToken cancellationToken = default
)Parameters
- signer CmsSigner
- The signer.
- content Stream
- The content.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskApplicationPkcs7MimeA new ApplicationPkcs7Mime instance containing the detached signature data.
Implements
ISecureMimeContextEncapsulatedSignAsync(CmsSigner, Stream, CancellationToken)Remarks
Asynchronously signs and encapsulates the content using the specified signer.
Exceptions
| ArgumentNullException |
signer is . -or- content is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| CryptographicException | An error occurred in the cryptographic message syntax subsystem. |