Click or drag to resize
MimeKit

OpenPgpContextIsMatch(PgpPublicKey, MailboxAddress) Method

Check that a public key is a match for the specified mailbox.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
protected static bool IsMatch(
	PgpPublicKey key,
	MailboxAddress mailbox
)

Parameters

key  PgpPublicKey
The public key.
mailbox  MailboxAddress
The mailbox address.

Return Value

Boolean
true if the key is a match for the specified mailbox; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullException

key is null.

-or-

mailbox is null.

Remarks

Checks that the public key is a match for the specified mailbox.

If the mailbox is a SecureMailboxAddress with a non-empty Fingerprint, then the fingerprint is used to match the key's fingerprint. Otherwise, the email address(es) contained within the key's user identifier strings are compared to the mailbox address.

See Also