Click or drag to resize
MimeKit

GnuPGContextGetPublicKeyRingAsync Method

Asynchronously 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 Task<PgpPublicKeyRing> GetPublicKeyRingAsync(
	long keyId,
	CancellationToken cancellationToken
)

Parameters

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

Return Value

TaskPgpPublicKeyRing
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 RetrievePublicKeyRingAsync(Int64, CancellationToken) to attempt to retrieve the keyring from the configured KeyServer.
See Also