ISecure 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#
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.
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. |