Sample code for 30+ languages & platforms
Tcl

Workaround for the deprecated Crypt2.CrcBytes method

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

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

set crypt [new_CkCrypt2]

set path "c:/someDir/example.dat"
set algorithm "crc-32"

# ------------------------------------------------------------------------
# The CrcBytes method is deprecated:

set inData [new_CkByteData]

CkByteData_loadFile $inData $path

set crc [CkCrypt2_CrcBytes $crypt $algorithm $inData]

# ------------------------------------------------------------------------
# Workaround.
# (Chilkat is moving away from using CkByteData)

set bdIn [new_CkBinData]

CkBinData_LoadFile $bdIn $path

set crc [CkCrypt2_CrcBd $crypt $algorithm $bdIn]

delete_CkCrypt2 $crypt
delete_CkByteData $inData
delete_CkBinData $bdIn