CngUIPolicy Constructors

Definition

Initializes a new instance of the CngUIPolicy class.

Overloads

CngUIPolicy(CngUIProtectionLevels)

Initializes a new instance of the CngUIPolicy class by using the specified protection level.

CngUIPolicy(CngUIProtectionLevels, String)

Initializes a new instance of the CngUIPolicy class by using the specified protection level and friendly name.

CngUIPolicy(CngUIProtectionLevels, String, String)

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, and description.

CngUIPolicy(CngUIProtectionLevels, String, String, String)

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, description string, and use context.

CngUIPolicy(CngUIProtectionLevels, String, String, String, String)

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, description string, use context, and title.

CngUIPolicy(CngUIProtectionLevels)

Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs

Initializes a new instance of the CngUIPolicy class by using the specified protection level.

C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel);

Parameters

protectionLevel
CngUIProtectionLevels

A bitwise combination of the enumeration values that specify the protection level.

Remarks

This constructor sets the protection level for the key in UI prompting scenarios.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

CngUIPolicy(CngUIProtectionLevels, String)

Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs

Initializes a new instance of the CngUIPolicy class by using the specified protection level and friendly name.

C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string? friendlyName);
C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName);

Parameters

protectionLevel
CngUIProtectionLevels

A bitwise combination of the enumeration values that specify the protection level.

friendlyName
String

A friendly name for the key to be used in the UI prompt. Specify a null string to use the default name.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

CngUIPolicy(CngUIProtectionLevels, String, String)

Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, and description.

C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string? friendlyName, string? description);
C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description);

Parameters

protectionLevel
CngUIProtectionLevels

A bitwise combination of the enumeration values that specify the protection level.

friendlyName
String

A friendly name for the key to be used in the UI prompt. Specify a null string to use the default name.

description
String

The full-text description of the key. Specify a null string to use the default description.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

CngUIPolicy(CngUIProtectionLevels, String, String, String)

Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, description string, and use context.

C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string? friendlyName, string? description, string? useContext);
C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description, string useContext);

Parameters

protectionLevel
CngUIProtectionLevels

A bitwise combination of the enumeration values that specify the protection level.

friendlyName
String

A friendly name for the key to be used in the UI prompt. Specify a null string to use the default name.

description
String

The full-text description of the key. Specify a null string to use the default description.

useContext
String

A description of how the key will be used. Specify a null string to use the default description.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

CngUIPolicy(CngUIProtectionLevels, String, String, String, String)

Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs
Source:
CngUIPolicy.cs

Initializes a new instance of the CngUIPolicy class by using the specified protection level, friendly name, description string, use context, and title.

C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string? friendlyName, string? description, string? useContext, string? creationTitle);
C#
public CngUIPolicy(System.Security.Cryptography.CngUIProtectionLevels protectionLevel, string friendlyName, string description, string useContext, string creationTitle);

Parameters

protectionLevel
CngUIProtectionLevels

A bitwise combination of the enumeration values that specify the protection level.

friendlyName
String

A friendly name for the key to be used in the UI prompt. Specify a null string to use the default name.

description
String

The full-text description of the key. Specify a null string to use the default description.

useContext
String

A description of how the key will be used. Specify a null string to use the default description.

creationTitle
String

The title for the dialog box that provides the UI prompt. Specify a null string to use the default title.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, 6, 7, 8, 9, 10
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5