C++
C++
Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile method.Chilkat C++ Downloads
#include <CkCrypt2.h>
void ChilkatSample(void)
{
bool success = false;
CkCrypt2 crypt;
success = false;
// Do public-key decryption (RSA)
crypt.put_CryptAlgorithm("pki");
// ...
// ...
// ...
const char *pfxPath = "c:/my_pfx_files/a.pfx";
const char *pfxPassword = "secret1";
success = crypt.AddPfxSourceFile(pfxPath,pfxPassword);
if (success == false) {
std::cout << crypt.lastErrorText() << "\r\n";
return;
}
// Add as many as PFX sources as desired...
pfxPath = "c:/my_pfx_files/b.pfx";
pfxPassword = "secret2";
success = crypt.AddPfxSourceFile(pfxPath,pfxPassword);
if (success == false) {
std::cout << crypt.lastErrorText() << "\r\n";
return;
}
// ...
// ...
}