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 類別上的屬性來指定無錯誤的名稱,或比較此屬性所擷取的名稱與已知的字串。

適用於

另請參閱