Sample code for 30+ languages & platforms
Xbase++

Example: Crypt2.CrcBd method

Demonstrates how to call the CrcBd method.

Chilkat Xbase++ Downloads

Xbase++
LOCAL oCrypt
LOCAL oBd
LOCAL nCrc32
LOCAL nCrc8

oCrypt := CreateObject("Chilkat.Crypt2")

oBd := CreateObject("Chilkat.BinData")
oBd:AppendString("123456789", "us-ascii")

nCrc32 := oCrypt:CrcBd("crc-32", oBd)
//  The decimal value is 3421780262 (converted to hex is 0xCBF43926)
? Str(nCrc32)

nCrc8 := oCrypt:CrcBd("crc8", oBd)
? Str(nCrc8)

oCrypt:destroy()
oBd:destroy()