Node.js
Node.js
Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile method.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var success = false;
var crypt = new chilkat.Crypt2();
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;
}
// ...
// ...
}
chilkatExample();