CertificateRequestProperties.KeyProtectionLevel | keyProtectionLevel property

Gets or sets the level of strong key protection.

Syntax


var keyProtectionLevel = certificateRequestProperties.keyProtectionLevel;
certificateRequestProperties.keyProtectionLevel = keyProtectionLevel;

Property value

Type: KeyProtectionLevel

Strong key protection level.

Remarks

The default KeyProtectionLevel value is NoConsent. By default, therefore, strong key protection is not specified.

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;
}


Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

CertificateRequestProperties

 

 

Show:
© 2015 Microsoft