Sample code for 30+ languages & platforms
Tcl

Workaround for the deprecated Crypt2.AddPfxSourceData method

Shows how to replace the deprecated AddPfxSourceData method. (Chilkat is moving away from the use of CkByteData.)

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set success 0

set crypt [new_CkCrypt2]

set path "c:/data/example.pfx"
set pfxPassword "secret"

# ------------------------------------------------------------------------
# The AddPfxSourceData method is deprecated:

set inData [new_CkByteData]

CkByteData_loadFile $inData $path

set success [CkCrypt2_AddPfxSourceData $crypt $inData $pfxPassword]

# ------------------------------------------------------------------------
# Workaround.
# (Chilkat is moving away from using CkByteData)
set bdIn [new_CkBinData]

CkBinData_LoadFile $bdIn $path

set success [CkCrypt2_AddPfxSourceBd $crypt $bdIn $pfxPassword]

delete_CkCrypt2 $crypt
delete_CkByteData $inData
delete_CkBinData $bdIn