Click or drag to resize
MimeKit

OpenPgpContextImport(Stream, CancellationToken) Method

Import public pgp keys from the specified stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public override void Import(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream  Stream
The raw key data.
cancellationToken  CancellationToken  (Optional)
The cancellation token.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
IOException

An error occurred while parsing the raw key-ring data

-or-

An error occured while saving the public key-ring bundle.

OperationCanceledException The operation was canceled via the cancellation token.
Remarks
Imports public pgp keys from the specified stream.
See Also