Windows Secure Mime ContextSign Async(Cms Signer, Stream, Cancellation Token) Method
Asynchronously sign the content using the specified signer.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
A new ApplicationPkcs7Signature instance containing the detached signature data.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override Task<ApplicationPkcs7Signature> SignAsync(
CmsSigner signer,
Stream content,
CancellationToken cancellationToken = default
)Parameters
- signer CmsSigner
- The signer.
- content Stream
- The content.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskApplicationPkcs7SignatureA new ApplicationPkcs7Signature instance containing the detached signature data.
Implements
ISecureMimeContextSignAsync(CmsSigner, Stream, CancellationToken)Remarks
Asynchronously signs 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. |