CertificateRequestProperties.KeyStorageProviderName 属性

定义

获取或设置将用于生成私钥的 KSP) (密钥存储提供程序的名称。

public:
 property Platform::String ^ KeyStorageProviderName { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring KeyStorageProviderName();

void KeyStorageProviderName(winrt::hstring value);
public string KeyStorageProviderName { get; set; }
var string = certificateRequestProperties.keyStorageProviderName;
certificateRequestProperties.keyStorageProviderName = string;
Public Property KeyStorageProviderName As String

属性值

String

Platform::String

winrt::hstring

KSP 名称。 默认值为“Microsoft 软件密钥存储提供程序”。

示例

public String GetSetKspName(String strNameIn)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();

    // The default value is Microsoft Software Key Storage Provider.
    String strDefaultName = reqProperties.KeyStorageProviderName;

    // If the input option does not equal the default option, reset the property value.
    if (strNameIn != strDefaultName)
    {
        reqProperties.KeyStorageProviderName = strNameIn;
    }

    // Return the KSP name.
    return reqProperties.KeyStorageProviderName;
}

注解

无法使用 CSP) (加密服务提供程序的名称。

适用于