Click or drag to resize
MimeKit

OpenPgpContextGetPublicKeyRing Method

Get the public keyring that contains the specified key.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
protected abstract 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 canceled via the cancellation token.
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