Open Pgp ContextGet Signing Key Async Method
Asynchronously get the signing key associated with the mailbox address.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The signing key.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public virtual Task<PgpSecretKey> GetSigningKeyAsync(
MailboxAddress mailbox,
CancellationToken cancellationToken = default
)Parameters
- mailbox MailboxAddress
- The mailbox.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskPgpSecretKeyThe signing key.
Remarks
Asynchronously gets the signing key associated with the mailbox address.
Exceptions
| ArgumentNullException | mailbox is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| PrivateKeyNotFoundException | A secret key for the specified mailbox could not be found. |