Open |
public MimePart Encrypt( EncryptionAlgorithm algorithm, IEnumerable<PgpPublicKey> 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. |
| NotSupportedException | The specified encryption algorithm is not supported. |
| OperationCanceledException | The operation was canceled via the cancellation token. |