CngKey.HasProperty(String, CngPropertyOptions) Method
In this article
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks to see whether the specified property exists on the key.
public:
bool HasProperty(System::String ^ name, System::Security::Cryptography::CngPropertyOptions options);
public bool HasProperty(string name, System.Security.Cryptography.CngPropertyOptions options);
[System.Security.SecurityCritical]
public bool HasProperty(string name, System.Security.Cryptography.CngPropertyOptions options);
member this.HasProperty : string * System.Security.Cryptography.CngPropertyOptions -> bool
[<System.Security.SecurityCritical>]
member this.HasProperty : string * System.Security.Cryptography.CngPropertyOptions -> bool
Public Function HasProperty (name As String, options As CngPropertyOptions) As Boolean
- name
- String
The property name to check.
- options
- CngPropertyOptions
A bitwise combination of the enumeration values that specify options for the named property.
true
if the specified property is found; otherwise, false
.
- Attributes
name
is null
.
The options
parameter is specifically used to indicate the following:
Whether the property is built-in, or custom.
Whether the property should be persisted with the key.
These options must match the value that the property was set with, or the property will not be found.
This method operates correctly even if the property is set to false
or zero.
Applies to
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, 6, 7, 8, 9, 10 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |