Click or drag to resize
MimeKit

WindowsSecureMimeContextDecryptToAsync Method

Asynchronously decrypts the specified encryptedData to an output stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public override Task DecryptToAsync(
	Stream encryptedData,
	Stream decryptedData,
	CancellationToken cancellationToken = default
)

Parameters

encryptedData  Stream
The encrypted data.
decryptedData  Stream
The decrypted data.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Implements

ISecureMimeContextDecryptToAsync(Stream, Stream, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullException

encryptedData is null.

-or-

decryptedData is null.

OperationCanceledException The operation was canceled via the cancellation token.
CryptographicException An error occurred in the cryptographic message syntax subsystem.
Remarks
Asynchronously decrypts the specified encryptedData to an output stream.
See Also