Open |
public Task<MimePart> SignAndEncryptAsync( MailboxAddress signer, DigestAlgorithm digestAlgo, EncryptionAlgorithm cipherAlgo, IEnumerable<MailboxAddress> recipients, Stream content, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | signer is null. -or- recipients is null. -or- content is null. |
ArgumentException | signer cannot be used for signing. -or- One or more of the recipient keys cannot be used for encrypting. -or- No recipients were specified. |
NotSupportedException | The specified encryption algorithm is not supported. |
OperationCanceledException | The user chose to cancel the password prompt. -or- The operation was canceled via the cancellation token. |
UnauthorizedAccessException | 3 bad attempts were made to unlock the secret key. |