CryptographyContextCanSignAsync Method

Asynchronously check whether a particular mailbox address can be used for signing.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public virtual Task<bool> CanSignAsync(
	MailboxAddress signer,
	CancellationToken cancellationToken = default
)

Parameters

signer  MailboxAddress
The signer.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskBoolean
if the mailbox address can be used for signing; otherwise, .

Implements

ICryptographyContextCanSignAsync(MailboxAddress, CancellationToken)

Remarks

Checks whether as particular mailbocx address can be used for signing.

Exceptions

ArgumentNullException signer is .
OperationCanceledException The operation was canceled via the cancellation token.

See Also