Key​Storage​Provider​Names Key​Storage​Provider​Names Key​Storage​Provider​Names Key​Storage​Provider​Names Class

Definition

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

public : static class KeyStorageProviderNamespublic static class KeyStorageProviderNamesPublic Static Class KeyStorageProviderNames// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

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.

Properties

PassportKeyStorageProvider PassportKeyStorageProvider PassportKeyStorageProvider PassportKeyStorageProvider

Returns "Microsoft Passport Key Storage Provider" as the provider name.

public : static PlatForm::String PassportKeyStorageProvider { get; }public static string PassportKeyStorageProvider { get; }Public Static ReadOnly Property PassportKeyStorageProvider As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The provider name.

PlatformKeyStorageProvider PlatformKeyStorageProvider PlatformKeyStorageProvider PlatformKeyStorageProvider

Returns "Microsoft Platform Crypyto Key Storage Provider" as the provider name.

public : static PlatForm::String PlatformKeyStorageProvider { get; }public static string PlatformKeyStorageProvider { get; }Public Static ReadOnly Property PlatformKeyStorageProvider As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The provider name.

Examples

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 Crypyto Key Storage Provider".
    reqProperties.KeyStorageProviderName = KeyStorageProviderNames.PlatformKeyStorageProvider;

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

SmartcardKeyStorageProvider SmartcardKeyStorageProvider SmartcardKeyStorageProvider SmartcardKeyStorageProvider

Returns "Microsoft Smart Card Key Storage Provider" as the provider name.

public : static PlatForm::String SmartcardKeyStorageProvider { get; }public static string SmartcardKeyStorageProvider { get; }Public Static ReadOnly Property SmartcardKeyStorageProvider As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The provider name.

SoftwareKeyStorageProvider SoftwareKeyStorageProvider SoftwareKeyStorageProvider SoftwareKeyStorageProvider

Returns "Microsoft Software Key Storage Provider" as the provider name.

public : static PlatForm::String SoftwareKeyStorageProvider { get; }public static string SoftwareKeyStorageProvider { get; }Public Static ReadOnly Property SoftwareKeyStorageProvider As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The provider name.