Open Pgp ContextRetrieve Public Key Ring Async Method
Asynchronously retrieve the public keyring using the configured key server.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The public key ring.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected Task<PgpPublicKeyRing?> RetrievePublicKeyRingAsync(
long keyId,
CancellationToken cancellationToken
)Parameters
- keyId Int64
- The identifier of the public key to be retrieved.
- cancellationToken CancellationToken
- The cancellation token.
Return Value
TaskPgpPublicKeyRingThe public key ring.
Remarks
Retrieves the public keyring specified by the keyId from the key server set on the KeyServer property. If the keyring is successfully retrieved, it will be imported via Import(PgpPublicKeyRingBundle, CancellationToken).
This method should be called by GetPublicKeyRingAsync(Int64, CancellationToken) when the keyring is not available locally.