Click or drag to resize
MimeKit

OpenPgpContextExportAsync(PgpPublicKeyRingBundle, Stream, Boolean, CancellationToken) Method

Asynchronously export the public keyring bundle.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public Task ExportAsync(
	PgpPublicKeyRingBundle keys,
	Stream stream,
	bool armor,
	CancellationToken cancellationToken = default
)

Parameters

keys  PgpPublicKeyRingBundle
The public keyring bundle to export.
stream  Stream
The output stream.
armor  Boolean
true if the output should be armored; otherwise, false.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.
Exceptions
ExceptionCondition
ArgumentNullException

keys is null.

-or-

stream is null.

IOException An I/O error occurred.
OperationCanceledException The operation was canceled via the cancellation token.
Remarks
Asynchronously exports the public keyring bundle.
See Also