Click or drag to resize
MimeKit

GnuPGContextGetPublicKeyRing Method

Get the public keyring that contains the specified key.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
protected override PgpPublicKeyRing GetPublicKeyRing(
	long keyId,
	CancellationToken cancellationToken
)

Parameters

keyId  Int64
The public key identifier.
cancellationToken  CancellationToken
The cancellation token.

Return Value

PgpPublicKeyRing
The public keyring that contains the specified key or null if the keyring could not be found.
Exceptions
ExceptionCondition
OperationCanceledException The operation was cancelled.
Remarks

Gets the public keyring that contains the specified key.

Note  Note
Implementations should first try to obtain the keyring stored (or cached) locally. Failing that, if AutoKeyRetrieve is enabled, they should use RetrievePublicKeyRing(Int64, CancellationToken) to attempt to retrieve the keyring from the configured KeyServer.
See Also