2.0.0-r1 #2
@@ -37,15 +37,16 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup -c && ./fixup",
|
||||
"build_win": "rollup -c && mingw64 ./fixup",
|
||||
"test": "jest",
|
||||
"prepublish": "rollup -c --silent && ./fixup"
|
||||
},
|
||||
"dependencies": {
|
||||
"@stablelib/xchacha20poly1305": "^1.0.1",
|
||||
"blake2b": "^2.1.4",
|
||||
"int64-buffer": "^1.0.0",
|
||||
"int64-buffer": "^1.1.0",
|
||||
"text-encoding": "^0.7.0",
|
||||
"uuid": "^8.3.2"
|
||||
"uuid": "^11.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
|
||||
@@ -14,7 +14,9 @@ const calculate_sha256 = (path) => {
|
||||
const hash = blake2b(32);
|
||||
|
||||
fs.createReadStream(path)
|
||||
.on('data', (data) => hash.update(data))
|
||||
.on('data', (data) => {
|
||||
return hash.update(new Uint8Array(data));
|
||||
})
|
||||
.on('error', (err) => reject(err))
|
||||
.on('end', () => {
|
||||
const h = hash.digest('hex');
|
||||
|
||||
Reference in New Issue
Block a user