public static ApplicationPkcs7Mime Encrypt( SecureMimeContext ctx, IEnumerable<MailboxAddress> recipients, MimeEntity entity, CancellationToken cancellationToken = default )
ctx is null.
recipients is null.
entity is null.
|Valid certificates could not be found for one or more of the recipients.
|entity has been disposed.
|The operation was canceled via the cancellation token.
|A certificate could not be found for one or more of the recipients.
|An error occurred in the cryptographic message syntax subsystem.