Sample code for 30+ languages & platforms
Chilkat2-Python

Example: Crypt2.CrcBd method

Demonstrates how to call the CrcBd method.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import chilkat2

crypt = chilkat2.Crypt2()

bd = chilkat2.BinData()
bd.AppendString("123456789","us-ascii")

crc32 = crypt.CrcBd("crc-32",bd)
# The decimal value is 3421780262 (converted to hex is 0xCBF43926)
print(str(crc32))

crc8 = crypt.CrcBd("crc8",bd)
print(str(crc8))