Sample code for 30+ languages & platforms
Tcl

Example: Crypt2.AddPfxSourceFile method

Demonstrates how to call the AddPfxSourceFile method.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set crypt [new_CkCrypt2]

set success 0

# Do public-key decryption (RSA)
CkCrypt2_put_CryptAlgorithm $crypt "pki"

# ...
# ...
# ...

set pfxPath "c:/my_pfx_files/a.pfx"
set pfxPassword "secret1"
set success [CkCrypt2_AddPfxSourceFile $crypt $pfxPath $pfxPassword]
if {$success == 0} then {
    puts [CkCrypt2_lastErrorText $crypt]
    delete_CkCrypt2 $crypt
    exit
}

# Add as many as PFX sources as desired...
set pfxPath "c:/my_pfx_files/b.pfx"
set pfxPassword "secret2"
set success [CkCrypt2_AddPfxSourceFile $crypt $pfxPath $pfxPassword]
if {$success == 0} then {
    puts [CkCrypt2_lastErrorText $crypt]
    delete_CkCrypt2 $crypt
    exit
}

# ...
# ...

delete_CkCrypt2 $crypt