Gnu PGContextGet Public Key Method
Get the public key associated with the mailbox address.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The public encryption key.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected virtual PgpPublicKey GetPublicKey(
MailboxAddress mailbox
)Parameters
- mailbox MailboxAddress
- The mailbox.
Return Value
PgpPublicKeyThe public encryption key.
Remarks
Gets a valid public key associated with the mailbox address that can be used for encryption.
Exceptions
| ArgumentNullException | mailbox is . |
| PublicKeyNotFoundException | The public key for the specified mailbox could not be found. |