CertificateRequestProperties.KeyProtectionLevel 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置强密钥保护的级别。
public:
property KeyProtectionLevel KeyProtectionLevel { KeyProtectionLevel get(); void set(KeyProtectionLevel value); };
KeyProtectionLevel KeyProtectionLevel();
void KeyProtectionLevel(KeyProtectionLevel value);
public KeyProtectionLevel KeyProtectionLevel { get; set; }
var keyProtectionLevel = certificateRequestProperties.keyProtectionLevel;
certificateRequestProperties.keyProtectionLevel = keyProtectionLevel;
Public Property KeyProtectionLevel As KeyProtectionLevel
属性值
强大的密钥保护级别。
示例
public KeyProtectionLevel GetSetKeyProtectionLevel(KeyProtectionLevel levelIn)
{
// Create a new CertificateRequestProperties object.
CertificateRequestProperties reqProperties = new CertificateRequestProperties();
// The default value is NoConsent.
KeyProtectionLevel defaultLevel = reqProperties.KeyProtectionLevel;
// If the input option does not equal the default option, reset the property value.
if (levelIn != defaultLevel)
{
reqProperties.KeyProtectionLevel = levelIn;
}
// return the key protection level.
return reqProperties.KeyProtectionLevel;
}
注解
默认 KeyProtectionLevel 值为 NoConsent。 因此,默认情况下未指定强密钥保护。