Sample code for 30+ languages & platforms
CkPython Requires Chilkat v11.0.0+

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 CkPython Downloads

CkPython
import chilkat

crypt = chilkat.CkCrypt2()

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

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

inData = chilkat.CkByteData()
inData.loadFile(path)

crc = crypt.CrcBytes(algorithm,inData)

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

bdIn = chilkat.CkBinData()
bdIn.LoadFile(path)

crc = crypt.CrcBd(algorithm,bdIn)