JavaScript
JavaScript
Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
var success = false;
var crypt = new CkCrypt2();
success = false;
// Do public-key decryption (RSA)
crypt.CryptAlgorithm = "pki";
// ...
// ...
// ...
var bdPfx = new CkBinData();
success = bdPfx.LoadFile("c:/my_pfx_files/a.pfx");
// ...
var pfxPassword = "secret1";
success = crypt.AddPfxSourceBd(bdPfx,pfxPassword);
if (success == false) {
console.log(crypt.LastErrorText);
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) {
console.log(crypt.LastErrorText);
return;
}
// ...
// ...