IApplicationPkcs7MimeDecrypt(CancellationToken) Method

Decrypt the enveloped-data.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
MimeEntity Decrypt(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

MimeEntity
The decrypted MimeEntity.

Remarks

Decrypts the enveloped-data using the default SecureMimeContext.

Exceptions

InvalidOperationException The "smime-type" parameter on the Content-Type header is not "certs-only".
ObjectDisposedException The IApplicationPkcs7Mime has been disposed.
OperationCanceledException The operation was canceled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.

See Also