Open |
public Task<MimePart> EncryptAsync( EncryptionAlgorithm algorithm, IEnumerable<PgpPublicKey> recipients, Stream content, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | recipients is null. -or- content is null. |
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. |