CngKey.SetProperty Method (CngProperty)


Sets a named property on the key.

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

[SecurityPermissionAttribute(SecurityAction.Demand, UnmanagedCode = true)]
public void SetProperty(
	CngProperty property


Type: System.Security.Cryptography.CngProperty

The key property to set.

This method enables you to add a new custom property to an existing key by using a CngProperty object. The options set on the CngProperty object must exactly match the options in the GetProperty call. Otherwise, the property will not be found.


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

.NET Framework
Available since 3.5
Return to top