Open |
public Task<MimePart> EncryptAsync( EncryptionAlgorithm algorithm, IEnumerable<MailboxAddress> recipients, Stream content, CancellationToken cancellationToken = default )
| Exception | Condition |
|---|---|
| ArgumentNullException | recipients is . -or- content is . |
| ArgumentException | One or more of the recipient keys cannot be used for encrypting. -or- No recipients were specified. |
| PublicKeyNotFoundException | A public key could not be found for one or more of the recipients. |
| NotSupportedException | The specified encryption algorithm is not supported. |
| OperationCanceledException | The operation was canceled via the cancellation token. |