Sample code for 30+ languages & platforms
Visual FoxPro

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile method.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loCrypt
LOCAL lcPfxPath
LOCAL lcPfxPassword

lnSuccess = 0

loCrypt = CreateObject('Chilkat.Crypt2')
lnSuccess = 0

*  Do public-key decryption (RSA)
loCrypt.CryptAlgorithm = "pki"

*  ...
*  ...
*  ...

lcPfxPath = "c:/my_pfx_files/a.pfx"
lcPfxPassword = "secret1"
lnSuccess = loCrypt.AddPfxSourceFile(lcPfxPath,lcPfxPassword)
IF (lnSuccess = 0) THEN
    ? loCrypt.LastErrorText
    RELEASE loCrypt
    CANCEL
ENDIF

*  Add as many as PFX sources as desired...
lcPfxPath = "c:/my_pfx_files/b.pfx"
lcPfxPassword = "secret2"
lnSuccess = loCrypt.AddPfxSourceFile(lcPfxPath,lcPfxPassword)
IF (lnSuccess = 0) THEN
    ? loCrypt.LastErrorText
    RELEASE loCrypt
    CANCEL
ENDIF

*  ...
*  ...

RELEASE loCrypt