Lua
Lua
Example: Crypt2.CrcBd method
Demonstrates how to call the CrcBd method.Chilkat Lua Downloads
local chilkat = require("chilkat")
local crypt = chilkat.Crypt2.new()
local bd = chilkat.BinData.new()
bd:append_string("123456789", "us-ascii")
local crc32 = crypt:crc_bd("crc-32", bd)
-- The decimal value is 3421780262 (converted to hex is 0xCBF43926)
print(crc32)
local crc8 = crypt:crc_bd("crc8", bd)
print(crc8)