CngKey.SetProperty(CngProperty) 方法

定义

设置密钥的已命名属性。

C#
public void SetProperty(System.Security.Cryptography.CngProperty property);
C#
[System.Security.SecurityCritical]
public void SetProperty(System.Security.Cryptography.CngProperty property);

参数

property
CngProperty

要设置的密钥属性。

属性

注解

使用此方法,可以使用 对象向现有键添加新的 CngProperty 自定义属性。 对象上 CngProperty 设置的选项必须与调用中的 GetProperty 选项完全匹配。 否则,将找不到 属性。

适用于

产品 版本
.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