Parameters Property
Collapse the table of content
Expand the table of content

CngKeyCreationParameters.Parameters Property


Enables a CngKey object to be created with additional properties that are set before the key is finalized.

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

public CngPropertyCollection Parameters {
	[SecurityPermissionAttribute(SecurityAction.Demand, UnmanagedCode = true)]

Property Value

Type: System.Security.Cryptography.CngPropertyCollection

A collection object that contains any additional parameters that you must set on a CngKey object during key creation.

The CngKeyCreationParameters class enables you to create a new CngKey object and initialize it with common properties. If you must set additional properties on the key during its creation, follow these steps:

  1. Create a new CngProperty object for each additional property that you must set.

  2. Call the Parameters property to obtain an empty CngPropertyCollection object.

  3. Add the CngProperty objects to the CngPropertyCollection object.

  4. Call the Create(CngAlgorithm, String, CngKeyCreationParameters) method overload and pass the initialized CngKeyCreationParameters object to it.


for operating with unmanaged code. Demand value: LinkDemand. Associated enumeration: SecurityPermissionFlag.UnmanagedCode

Universal Windows Platform
Available since 10
.NET Framework
Available since 3.5
Return to top
© 2016 Microsoft