X509Certificate 2ExtensionsGet Encryption Algorithms Method
Get the encryption algorithms that can be used with an X.509 certificate.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The encryption algorithms.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static EncryptionAlgorithm[] GetEncryptionAlgorithms(
this X509Certificate2 certificate
)Parameters
- certificate X509Certificate2
- The X.509 certificate.
Return Value
EncryptionAlgorithmThe encryption algorithms.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
Scans the X.509 certificate for the S/MIME capabilities extension. If found, the supported encryption algorithms will be decoded and returned.
If no extension can be found, the TripleDes algorithm is returned.
Exceptions
| ArgumentNullException | certificate is . |