Compartir a través de


IVsStrongNameKeys2.CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm Method

Creates a new key using a specified Signature Algorithm to be used for signing, exporting to a file, and creating a new key container.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

Syntax

'Declaration
Function CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm ( _
    pszAlgorithmID As String, _
    dwKeyLength As UInteger, _
    szFile As String, _
    szPassword As String, _
    szSubjectName As String _
) As Integer
int CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm(
    string pszAlgorithmID,
    uint dwKeyLength,
    string szFile,
    string szPassword,
    string szSubjectName
)
int CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm(
    [InAttribute] String^ pszAlgorithmID, 
    [InAttribute] unsigned int dwKeyLength, 
    [InAttribute] String^ szFile, 
    [InAttribute] String^ szPassword, 
    [InAttribute] String^ szSubjectName
)
abstract CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm : 
        pszAlgorithmID:string * 
        dwKeyLength:uint32 * 
        szFile:string * 
        szPassword:string * 
        szSubjectName:string -> int
function CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm(
    pszAlgorithmID : String, 
    dwKeyLength : uint, 
    szFile : String, 
    szPassword : String, 
    szSubjectName : String
) : int

Parameters

  • pszAlgorithmID
    Type: String

    [in] The encryption algorithm identifier. If null is passed in for this parameter, the default SHA-256 algorithm is used.

  • dwKeyLength
    Type: UInt32

    [in] The length of the encryption key. If zero (0) is passed in for this parameter, the system default key length is used.

  • szFile
    Type: String

    [in] The file in which to store the encryption key.

  • szPassword
    Type: String

    [in] The password for the key being generated.

  • szSubjectName
    Type: String

    [in] The name that goes after “CN=” in the certificate name.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This member only supports specifying those cryptographic algorithms for which CRYPT_OBJID_BLOB is zero (see the CRYPT_ALGORITHM_IDENTIFIER structure for more information).

.NET Framework Security

See Also

Reference

IVsStrongNameKeys2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace