Click or drag to resize
MimeKit

OpenPgpContextImport(PgpPublicKeyRing, CancellationToken) Method

Import a public pgp keyring.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public abstract void Import(
	PgpPublicKeyRing keyring,
	CancellationToken cancellationToken = default
)

Parameters

keyring  PgpPublicKeyRing
The public key-ring to import.
cancellationToken  CancellationToken  (Optional)
The cancellation token.
Exceptions
ExceptionCondition
ArgumentNullExceptionkeyring is null.
IOException An error occured while saving the public key-ring.
OperationCanceledException The operation was canceled via the cancellation token.
Remarks
Imports a public pgp keyring.
See Also