Sample code for 30+ languages & platforms
Node.js

Example: Crypt2.AddPfxSourceBd method

Demonstrates how to call the AddPfxSourceBd method.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var crypt = new chilkat.Crypt2();
    success = false;

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

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

    var bdPfx = new chilkat.BinData();
    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;
    }

    //  ...
    //  ...

}

chilkatExample();