Share via


KeyStorageProviderNames 클래스

정의

일반적으로 사용되는 몇 가지 키 스토리지 공급자 이름을 정의합니다. CertificateRequestProperties 클래스의 KeyStorageProviderName 속성에서 이 클래스를 사용할 수 있습니다.

public ref class KeyStorageProviderNames abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class KeyStorageProviderNames final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class KeyStorageProviderNames
Public Class KeyStorageProviderNames
상속
Object Platform::Object IInspectable KeyStorageProviderNames
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

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

설명

이 클래스에는 정적 속성만 포함됩니다. 속성을 검색하기 위해 클래스의 instance 만들 필요가 없습니다. 대신 클래스 이름 뒤에 점 연산자(.) 뒤에 속성 이름을 사용합니다.

속성

PassportKeyStorageProvider

공급자 이름으로 "Microsoft Passport Key Storage 공급자"를 반환합니다.

PlatformKeyStorageProvider

공급자 이름으로 "Microsoft Platform Crypyto Key Storage Provider"를 반환합니다.

SmartcardKeyStorageProvider

공급자 이름으로 "Microsoft 스마트 카드 키 스토리지 공급자"를 반환합니다.

SoftwareKeyStorageProvider

공급자 이름으로 "Microsoft 소프트웨어 키 스토리지 공급자"를 반환합니다.

적용 대상

추가 정보