(Node.js) Example: Crypt2.CrcFile method
Demonstrates how to call the CrcFile method.
var os = require('os');
if (os.platform() == 'win32') {
var chilkat = require('@chilkat/ck-node23-win64');
} else if (os.platform() == 'linux') {
if (os.arch() == 'arm') {
var chilkat = require('@chilkat/ck-node23-linux-arm');
} else if (os.arch() == 'arm64') {
var chilkat = require('@chilkat/ck-node23-linux-arm64');
} else {
var chilkat = require('@chilkat/ck-node23-linux-x64');
}
} else if (os.platform() == 'darwin') {
var chilkat = require('@chilkat/ck-node23-mac-universal');
}
function chilkatExample() {
var crypt = new chilkat.Crypt2();
var filePath = "c:/temp/someFile.dat";
var crc32 = crypt.CrcFile("crc-32",filePath);
console.log(crc32);
var crc8 = crypt.CrcFile("crc8",filePath);
console.log(crc8);
}
chilkatExample();
|