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