public SmimeResult Decrypt2( MailMessage message, X509Certificate2Collection extraCerts )
Public Function Decrypt2 ( message As MailMessage, extraCerts As X509Certificate2Collection ) As SmimeResult
This method looks for the appropriate certificate for decryption in the Personal storage and in the specified certificates. The certificate in question must contain a private key.
To decrypt and verify a message within a single method call, use DecryptAndVerify(MailMessage, MessageVerificationFlags) method or its overloads.
This method is a version of Decrypt(MailMessage, CertificateStore) which accepts X509Certificate2Collection rather than CertificateStore. Starting from .NET Standard 2.0, you must use this method as CertificateStore functionality has been reduced to avoid dependency on Win32 API.
|This method is not available in .NET Сore 1.0/1.1. On that platform, use Decrypt(MailMessage, CertificateStore) instead.|