KeyStorageProviderNames KeyStorageProviderNames KeyStorageProviderNames KeyStorageProviderNames KeyStorageProviderNames 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 KeyStorageProviderNames
static struct winrt::Windows::Security::Cryptography::Certificates::KeyStorageProviderNames
public static class KeyStorageProviderNames
Public Shared Class KeyStorageProviderNames
// This class does not provide a public constructor.
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 PassportKeyStorageProvider

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

PlatformKeyStorageProvider PlatformKeyStorageProvider PlatformKeyStorageProvider PlatformKeyStorageProvider PlatformKeyStorageProvider

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

SmartcardKeyStorageProvider SmartcardKeyStorageProvider SmartcardKeyStorageProvider SmartcardKeyStorageProvider SmartcardKeyStorageProvider

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

SoftwareKeyStorageProvider SoftwareKeyStorageProvider SoftwareKeyStorageProvider SoftwareKeyStorageProvider SoftwareKeyStorageProvider

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

See Also