Extracts an encrypted private key from a PKCS-12 PKCS8ShroudedKeyBag, saving the output directly as a new file.
Public Declare Function RSA_GetPrivateKeyFromPFX Lib "diCrPKI.dll"
(ByVal strOutputFile As String, ByVal strPfxFile As String,
ByVal nOptions As Long) As Long
nRet = RSA_GetPrivateKeyFromPFX(strOutputFile, strPfxFile,
nOptions) As Long
String specifying the filename of the output file to be created.String containing the PFX filenameLong option flags: not used in this release. Specify zero.
long _stdcall RSA_GetPrivateKeyFromPFX(const char *szOutputFile, const char *szPFXFile,
long nOptions);
Long: If successful, it returns the number of bytes written to the output file;
otherwise it returns a negative error code.
Rsa.GetPrivateKeyFromPFX Method
The first pkcs-12-pkcs-8ShroudedKeyBag found in the PFX file will be extracted and saved directly
as a BER-encoded EncryptedPrivateKeyInfo file.
No decryption or other conversion is carried out.
nChars = RSA_GetPrivateKeyFromPFX(strEPKFile, strPfxFile, 0)
RSA_ReadEncPrivateKey RSA_ReadPrivateKeyFromPFX PFX_MakeFile