AesCng 构造函数

定义

初始化 AesCng 类的新实例。

重载

AesCng()

使用临时密钥初始化 AesCng 类的新实例。

AesCng(String)

使用指定密钥名称初始化 AesCng 类的新实例,该密钥名称表示现有的保留的 AES 密钥。

AesCng(String, CngProvider)

使用指定的密钥名称和密钥存储提供者 (KSP) 初始化 AesCng 类的新实例,其中指定的密钥名称表示现有的保留的 AES 密钥。

AesCng(String, CngProvider, CngKeyOpenOptions)

使用指定的密钥名称初始化 类的新实例,该名称 AesCng 表示现有的持久化 AES 密钥、指定的密钥存储提供程序 (KSP) 和密钥打开选项。

AesCng()

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

使用临时密钥初始化 AesCng 类的新实例。

public:
 AesCng();
public AesCng ();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng ();
Public Sub New ()
属性

适用于

AesCng(String)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

使用指定密钥名称初始化 AesCng 类的新实例,该密钥名称表示现有的保留的 AES 密钥。

public:
 AesCng(System::String ^ keyName);
public AesCng (string keyName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName);
new System.Security.Cryptography.AesCng : string -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String)

参数

keyName
String

键的名称。

属性

例外

keyNamenull

此系统上不支持下一代加密技术 (CNG)。

所有其他错误。

注解

此构造函数使用 默认值 CngKeyOpenOptionsNoneMicrosoftSoftwareKeyStorageProvider 作为默认密钥存储提供程序, (KSP) 打开密钥。

另请参阅

适用于

AesCng(String, CngProvider)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

使用指定的密钥名称和密钥存储提供者 (KSP) 初始化 AesCng 类的新实例,其中指定的密钥名称表示现有的保留的 AES 密钥。

public:
 AesCng(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider);
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider);
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String, provider As CngProvider)

参数

keyName
String

键的名称。

provider
CngProvider

包含密钥的 KSP。

属性

例外

keyNamenull

providernull

此系统上不支持下一代加密技术 (CNG)。

所有其他错误。

注解

默认值CngKeyOpenOptionsNone用于打开密钥。

另请参阅

适用于

AesCng(String, CngProvider, CngKeyOpenOptions)

Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs
Source:
Cng.NotSupported.cs

使用指定的密钥名称初始化 类的新实例,该名称 AesCng 表示现有的持久化 AES 密钥、指定的密钥存储提供程序 (KSP) 和密钥打开选项。

public:
 AesCng(System::String ^ keyName, System::Security::Cryptography::CngProvider ^ provider, System::Security::Cryptography::CngKeyOpenOptions openOptions);
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public AesCng (string keyName, System.Security.Cryptography.CngProvider provider, System.Security.Cryptography.CngKeyOpenOptions openOptions);
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.AesCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.AesCng : string * System.Security.Cryptography.CngProvider * System.Security.Cryptography.CngKeyOpenOptions -> System.Security.Cryptography.AesCng
Public Sub New (keyName As String, provider As CngProvider, openOptions As CngKeyOpenOptions)

参数

keyName
String

键的名称。

provider
CngProvider

包含密钥的 KSP。

openOptions
CngKeyOpenOptions

枚举值的一个按位组合,这些值指定打开密钥的选项,例如打开密钥的位置(计算机或用户存储)以及是否取消 UI 提示。

属性

例外

keyNamenull

providernull

此系统上不支持下一代加密技术 (CNG)。

所有其他错误。

另请参阅

适用于