Open Pgp ContextIs Match(PgpSecretKey, Mailbox Address) Method
Check that a secret key is a match for the specified mailbox.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
if the key is a match for the specified mailbox; otherwise, .
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected static bool IsMatch(
PgpSecretKey key,
MailboxAddress mailbox
)Parameters
- key PgpSecretKey
- The secret key.
- mailbox MailboxAddress
- The mailbox address.
Return Value
Booleanif the key is a match for the specified mailbox; otherwise, .
Remarks
Checks that the secret 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.
Exceptions
| ArgumentNullException |
key is . -or- mailbox is . |