CertificateRequestProperties.KeyAlgorithmName 属性

定义

获取或设置公钥算法。

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

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

属性值

String

Platform::String

winrt::hstring

算法名称。

示例

public String GetSetPublicKeyAlgorithm(String strAlgNameIn)
{
    // Create a new CertificateRequestProperties object.
    CertificateRequestProperties reqProperties = new CertificateRequestProperties();

    // The default value is RSA.
    String strDefaultAlgName = reqProperties.KeyAlgorithmName;

    // If the input option does not equal the default option, reset the property value.
    if (strAlgNameIn != strDefaultAlgName)
    {
        reqProperties.KeyAlgorithmName = strAlgNameIn;
    }

    // Return the algorithm name.
    return reqProperties.KeyAlgorithmName;
}

注解

默认值为“RSA”。 可以使用 KeyAlgorithmNames 类上的属性指定无错误的名称,或将此属性检索到的名称与已知字符串进行比较。

适用于

另请参阅