CngKey.HasProperty(String, CngPropertyOptions) CngKey.HasProperty(String, CngPropertyOptions) CngKey.HasProperty(String, CngPropertyOptions) CngKey.HasProperty(String, CngPropertyOptions) Method

Definition

Checks to see whether the specified property exists on the key.

public:
 bool HasProperty(System::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
Public Function HasProperty (name As String, options As CngPropertyOptions) As Boolean

Parameters

name
String String String String

The property name to check.

options
CngPropertyOptions CngPropertyOptions CngPropertyOptions 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.

Exceptions

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.

Security

SecurityPermission
for permission to call unmanaged code. Demand value: LinkDemand. Associated enumeration: UnmanagedCode

Applies to