CertificateRequestProperties.KeyProtectionLevel Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the level of strong key protection.
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
Property Value
Strong key protection level.
Examples
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;
}
Remarks
The default KeyProtectionLevel value is NoConsent. By default, therefore, strong key protection is not specified.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for