Click or drag to resize
MimeKit

GnuPGContextImport(PgpPublicKeyRing, CancellationToken) Method

Import a public pgp keyring.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public override 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