This commit is contained in:
2025-02-13 17:52:49 -06:00
parent 25cf5ce819
commit fbe27b828b
2 changed files with 6 additions and 3 deletions

View File

@@ -37,15 +37,16 @@
], ],
"scripts": { "scripts": {
"build": "rollup -c && ./fixup", "build": "rollup -c && ./fixup",
"build_win": "rollup -c && mingw64 ./fixup",
"test": "jest", "test": "jest",
"prepublish": "rollup -c --silent && ./fixup" "prepublish": "rollup -c --silent && ./fixup"
}, },
"dependencies": { "dependencies": {
"@stablelib/xchacha20poly1305": "^1.0.1", "@stablelib/xchacha20poly1305": "^1.0.1",
"blake2b": "^2.1.4", "blake2b": "^2.1.4",
"int64-buffer": "^1.0.0", "int64-buffer": "^1.1.0",
"text-encoding": "^0.7.0", "text-encoding": "^0.7.0",
"uuid": "^8.3.2" "uuid": "^11.0.5"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.14.3", "@babel/core": "^7.14.3",

View File

@@ -14,7 +14,9 @@ const calculate_sha256 = (path) => {
const hash = blake2b(32); const hash = blake2b(32);
fs.createReadStream(path) fs.createReadStream(path)
.on('data', (data) => hash.update(data)) .on('data', (data) => {
return hash.update(new Uint8Array(data));
})
.on('error', (err) => reject(err)) .on('error', (err) => reject(err))
.on('end', () => { .on('end', () => {
const h = hash.digest('hex'); const h = hash.digest('hex');