Click or drag to resize
MimeKit

SecureMimeContextDecryptToAsync Method

Asynchronously decrypts the specified encryptedData to an output stream.

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

Parameters

encryptedData
Type: System.IOStream
The encrypted data.
decryptedData
Type: System.IOStream
The stream to write the decrypted data to.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: Task
An asynchronous task context.
Exceptions
ExceptionCondition
ArgumentNullException

encryptedData is null.

-or-

decryptedData is null.

OperationCanceledException The operation was cancelled via the cancellation token.
Remarks
Asynchronously decrypts the specified encryptedData to an output stream.
See Also