Click or drag to resize
MimeKit

ApplicationPkcs7MimeDecryptAsync(CancellationToken) Method

Asynchronously decrypt the enveloped-data.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public Task<MimeEntity> DecryptAsync(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskMimeEntity
The decrypted MimeEntity.

Implements

IApplicationPkcs7MimeDecryptAsync(CancellationToken)
Exceptions
ExceptionCondition
InvalidOperationException The "smime-type" parameter on the Content-Type header is not "certs-only".
ObjectDisposedException The ApplicationPkcs7Mime has been disposed.
OperationCanceledException The operation was canceled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.
Remarks
Asynchronously decrypts the enveloped-data using the default SecureMimeContext.
See Also