ISecureMimeContextDecryptToAsync Method

Asynchronously decrypts the specified encryptedData to an output stream.

Definition

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

Parameters

encryptedData  Stream
The encrypted data.
decryptedData  Stream
The stream to write the decrypted data to.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Remarks

Asynchronously decrypts the specified encryptedData to an output stream.

Exceptions

ArgumentNullException

encryptedData is .

-or-

decryptedData is .

OperationCanceledException The operation was cancelled via the cancellation token.

See Also