Sample code for 30+ languages & platforms
JavaScript

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile 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.
JavaScript
var success = false;

var crypt = new CkCrypt2();
success = false;

// Do public-key decryption (RSA)
crypt.CryptAlgorithm = "pki";

// ...
// ...
// ...

var pfxPath = "c:/my_pfx_files/a.pfx";
var pfxPassword = "secret1";
success = crypt.AddPfxSourceFile(pfxPath,pfxPassword);
if (success == false) {
    console.log(crypt.LastErrorText);
    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) {
    console.log(crypt.LastErrorText);
    return;
}

// ...
// ...