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

@@ -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');