Click or drag to resize
MimeKit

IApplicationPkcs7MimeDecrypt(SecureMimeContext, CancellationToken) Method

Decrypt the enveloped-data.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
MimeEntity Decrypt(
	SecureMimeContext ctx,
	CancellationToken cancellationToken = default
)

Parameters

ctx  SecureMimeContext
The S/MIME context to use for decrypting.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

MimeEntity
The decrypted MimeEntity.
Exceptions
ExceptionCondition
ArgumentNullExceptionctx is null.
InvalidOperationException The "smime-type" parameter on the Content-Type header is not "enveloped-data".
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.
Remarks
Decrypts the enveloped-data using the specified SecureMimeContext.
See Also