Skip to content

Commit 091cc91

Browse files
committed
add crc64 demo
1 parent 9c7a452 commit 091cc91

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

demo/crc64.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var crc64 = require("crc64-ecma182.js");
2+
var path = require('path');
3+
4+
var hash = crc64.crc64(Buffer.from("hello!"));
5+
console.log('string crc64:', hash);
6+
7+
crc64.crc64File(path.join(__dirname, "./demo.js"), function(err, hash) {
8+
console.log('file crc64:', err || hash);
9+
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
},
3939
"devDependencies": {
4040
"batch": "^0.6.1",
41+
"crc64-ecma182.js": "^1.0.0",
4142
"mocha": "^4.0.1",
4243
"nyc": "^15.1.0",
4344
"qcloud-cos-sts": "^3.0.0"

0 commit comments

Comments
 (0)