Node.js
Node.js
Example: Crypt2.CrcBd method
Demonstrates how to call the CrcBd method.Chilkat Node.js Downloads
NODEJS_PRELUDE
function chilkatExample() {
var crypt = new chilkat.Crypt2();
var bd = new chilkat.BinData();
bd.AppendString("123456789","us-ascii");
var crc32 = crypt.CrcBd("crc-32",bd);
// The decimal value is 3421780262 (converted to hex is 0xCBF43926)
console.log(crc32);
var crc8 = crypt.CrcBd("crc8",bd);
console.log(crc8);
}
chilkatExample();