Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CngKey::HasProperty Method (String^, CngPropertyOptions)

 

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

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)

public:
[SecurityPermissionAttribute(SecurityAction::Demand, UnmanagedCode = true)]
bool HasProperty(
	String^ name,
	CngPropertyOptions options
)

Parameters

name
Type: System::String^

The property name to check.

options
Type: System.Security.Cryptography::CngPropertyOptions

A bitwise combination of the enumeration values that specify options for the named property.

Return Value

Type: System::Boolean

true if the specified property is found; otherwise, false.

Exception Condition
ArgumentNullException

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.

SecurityPermission

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

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft