CertificateRequestProperties.KeyAlgorithmName | keyAlgorithmName property

Applies to Windows and Windows Phone

Gets or sets the public key algorithm.

Syntax


Public Property KeyAlgorithmName As String

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

Algorithm name.

Remarks

The default value is "RSA". You can use properties on the KeyAlgorithmNames class to specify error-free names or to compare the name retrieved by this property with a known string.

Examples


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


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Security.Cryptography.Certificates
Windows::Security::Cryptography::Certificates [C++]

Metadata

Windows.winmd

See also

CertificateRequestProperties
KeyAlgorithmNames

 

 

Show:
© 2014 Microsoft