CngKey.HasProperty(String, CngPropertyOptions) Method
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
Parameters
- name
- String
The property name to check.
- options
- CngPropertyOptions
A bitwise combination of the enumeration values that specify options for the named property.
Returns
true
if the specified property is found; otherwise, false
.
- Attributes
Exceptions
name
is null
.
Remarks
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.