IVsStrongNameKeys2::CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm Method (String^, UInt32, String^, String^, String^)
Creates a new key using a specified Signature Algorithm to be used for signing, exporting to a file, and creating a new key container.
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
int CreateNewKeyWithNameAndSpecifiedSignatureAlgorithm( String^ pszAlgorithmID, unsigned int dwKeyLength, String^ szFile, String^ szPassword, String^ szSubjectName )
Parameters
- pszAlgorithmID
-
Type:
System::String^
[in] The encryption algorithm identifier. If null is passed in for this parameter, the default SHA-256 algorithm is used.
- dwKeyLength
-
Type:
System::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:
System::String^
[in] The file in which to store the encryption key.
- szPassword
-
Type:
System::String^
[in] The password for the key being generated.
- szSubjectName
-
Type:
System::String^
[in] The name that goes after “CN=” in the certificate name.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
This member only supports specifying those cryptographic algorithms for which CRYPT_OBJID_BLOB is zero (see the CRYPT_ALGORITHM_IDENTIFIER structure for more information).