Skip to main content
KeyStorageProviderNames class

Applies to Windows and Windows Phone

Defines several commonly used key storage provider names. You can use this class in the KeyStorageProviderName property on the CertificateRequestProperties class.

Syntax


var keyStorageProviderNames = Windows.Security.Cryptography.Certificates.KeyStorageProviderNames;

public static class KeyStorageProviderNames

Public NotInheritable Class KeyStorageProviderNames

public ref class KeyStorageProviderNames abstract sealed 

Attributes

[ DualApiPartition()]
[ MarshalingBehavior(Agile)]
[ Threading(Both)]
[ Version(0x06020000)]

Members

The KeyStorageProviderNames class has these types of members:

Methods

The KeyStorageProviderNames class inherits methods from the Object class (C#/VB/C++).

Properties

The KeyStorageProviderNames class has these properties.

PropertyAccess typeDescription

PlatformKeyStorageProvider

Read-onlyReturns Microsoft Platform Key Storage Provider as the provider name.

SmartcardKeyStorageProvider

Read-onlyReturns Microsoft Smart Card Key Storage Provider as the provider name.

SoftwareKeyStorageProvider

Read-onlyReturns Microsoft Software Key Storage Provider as the provider name.

 

Remarks

This class contains only static properties. You do not have to create an instance of the class to retrieve the properties. Instead, use the class name followed by the dot operator (.), followed by the property name.

Examples


using Windows.Security.Cryptography.Certificates;

namespace SampleKeyStorageProviderNames
{

    sealed partial class KspNamesApp : Application
    {
        public KspNamesApp()
        {
            // Initialize the application.
            this.InitializeComponent();

            // Demonstrate how to retrieve and set the key storage provider name.
            this.SampleKspNames();
        }

        public void SampleKspNames()
        {
            // Create a new CertificateRequestProperties object.
            CertificateRequestProperties reqProperties = new CertificateRequestProperties();

            // Retrieve the default value ("Microsoft Software Key Storage Provider").
            String strDefaultName = reqProperties.KeyStorageProviderName;

            // Set the value to "Microsoft Platform Crypto Provider".
            reqProperties.KeyStorageProviderName = KeyStorageProviderNames.PlatformKeyStorageProvider;

            // Set the value to "Microsoft Smart Card Key Storage Provider".
            reqProperties.KeyStorageProviderName = KeyStorageProviderNames.SmartcardKeyStorageProvider;
        }
    }
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

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
KeyStorageProviderName
Windows.Security.Cryptography.Certificates