System.Security.Cryptography.X509Certificates.X509FindType.FindByKeyUsage Field

The findValue parameter for the X509Certificate2Collection.Find(X509FindType, object, bool) method must be either a string representing the key usage or an integer representing a bit mask containing all the requested key usages. For the string value, only one key usage at a time can be specified, but the X509Certificate2Collection.Find(X509FindType, object, bool) method can be used in a cascading sequence to get the intersection of the requested usages. For example, the findValue parameter can be set to "KeyEncipherment" or an integer (0x30 indicates "KeyEncipherment" and "DataEncipherment"). Values of the System.Security.Cryptography.X509Certificates.X509KeyUsageFlags enumeration can also be used.

Syntax

X509FindType FindByKeyUsage

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0