Sample code for 30+ languages & platforms
Unicode C++

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile method.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkCrypt2W.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkCrypt2W crypt;
    success = false;

    //  Do public-key decryption (RSA)
    crypt.put_CryptAlgorithm(L"pki");

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

    const wchar_t *pfxPath = L"c:/my_pfx_files/a.pfx";
    const wchar_t *pfxPassword = L"secret1";
    success = crypt.AddPfxSourceFile(pfxPath,pfxPassword);
    if (success == false) {
        wprintf(L"%s\n",crypt.lastErrorText());
        return;
    }

    //  Add as many as PFX sources as desired...
    pfxPath = L"c:/my_pfx_files/b.pfx";
    pfxPassword = L"secret2";
    success = crypt.AddPfxSourceFile(pfxPath,pfxPassword);
    if (success == false) {
        wprintf(L"%s\n",crypt.lastErrorText());
        return;
    }

    //  ...
    //  ...
    }