Click or drag to resize
MimeKit

OpenPgpContextGetPublicKeys Method

Get the public keys for the specified mailbox addresses.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public abstract IList<PgpPublicKey> GetPublicKeys(
	IEnumerable<MailboxAddress> mailboxes,
	CancellationToken cancellationToken = default
)

Parameters

mailboxes  IEnumerableMailboxAddress
The mailboxes.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

IListPgpPublicKey
The encryption keys.
Exceptions
ExceptionCondition
ArgumentNullExceptionmailboxes is null.
OperationCanceledException The operation was canceled via the cancellation token.
PublicKeyNotFoundException A public key for one or more of the mailboxes could not be found.
Remarks
Gets a list of valid public keys for the specified mailbox addresses that can be used for encryption.
See Also