Windows Secure Mime ContextGet Preferred Encryption Algorithm(Cms Recipient Collection) Method
Definition
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
protected virtual EncryptionAlgorithm GetPreferredEncryptionAlgorithm(
CmsRecipientCollection recipients
)Parameters
- recipients CmsRecipientCollection
- The recipients.
Return Value
EncryptionAlgorithmThe preferred encryption algorithm.
Remarks
Gets the preferred encryption algorithm to use for encrypting to the specified recipients based on the encryption algorithms supported by each of the recipients, the EnabledEncryptionAlgorithms, and the EncryptionAlgorithmRank.
The encryption algorithms supported by each recipient are determined by the S/MIME capabilities previously advertised in a signed message from that recipient (see UpdateSecureMimeCapabilities(X509Certificate2, EncryptionAlgorithm, DateTime)) or, if none are known, the S/MIME capabilities extension of the recipient's certificate.
If the supported encryption algorithms are unknown for any recipient, it is assumed that the recipient supports at least the Triple-DES encryption algorithm.