This commit is contained in:
2025-02-13 12:12:19 -06:00
parent d6aa54e040
commit 1fe2472a51
3 changed files with 7 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import blake2 from 'blake2';
import blake2b from 'blake2b';
import fs from 'fs';
import { Uint64BE } from 'int64-buffer';
@@ -6,12 +6,12 @@ import * as repertory from '../index.js';
import connection from '../networking/connection';
const TEST_HOST = process.env.TEST_HOST || 'localhost';
const TEST_PASSWORD = process.env.TEST_PASSWORD || '';
const TEST_PASSWORD = process.env.TEST_PASSWORD || 'cow_moose_doge_chicken';
const TEST_PORT = process.env.TEST_PORT || 20000;
const calculate_sha256 = (path) => {
return new Promise((resolve, reject) => {
const hash = blake2.createHash('blake2b', { digestLength: 32 });
const hash = blake2b(32);
fs.createReadStream(path)
.on('data', (data) => hash.update(data))