CertificateRequestProperties.KeyProtectionLevel CertificateRequestProperties.KeyProtectionLevel CertificateRequestProperties.KeyProtectionLevel CertificateRequestProperties.KeyProtectionLevel CertificateRequestProperties.KeyProtectionLevel Property

Definition

Gets or sets the level of strong key protection.

public : KeyProtectionLevel KeyProtectionLevel { get; set; }
KeyProtectionLevel KeyProtectionLevel();

void KeyProtectionLevel(KeyProtectionLevel keyprotectionlevel);
public KeyProtectionLevel KeyProtectionLevel { get; set; }
Public ReadWrite Property KeyProtectionLevel As KeyProtectionLevel
var keyProtectionLevel = certificateRequestProperties.keyProtectionLevel;
certificateRequestProperties.keyProtectionLevel = keyProtectionLevel;

Property Value

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.