OpenPgpContextExportAsync(IEnumerableMailboxAddress, Stream, Boolean, CancellationToken) Method

Asynchronously export the public keyrings for the specified mailboxes.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public abstract Task ExportAsync(
	IEnumerable<MailboxAddress> mailboxes,
	Stream stream,
	bool armor,
	CancellationToken cancellationToken = default
)

Parameters

mailboxes  IEnumerableMailboxAddress
The mailboxes.
stream  Stream
The output stream.
armor  Boolean
if the output should be armored; otherwise, .
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Remarks

Asynchronously exports the public keyrings for the specified mailboxes.

Exceptions

ArgumentNullException

mailboxes is .

-or-

stream is .

ArgumentException mailboxes was empty.
IOException An I/O error occurred.
NotSupportedException Exporting keys is not supported by this cryptography context.
OperationCanceledException The operation was canceled via the cancellation token.

See Also