Click or drag to resize
MimeKit

GnuPGContextImport(PgpSecretKeyRing, CancellationToken) Method

Import a secret pgp keyring.

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

Parameters

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