Don't use md4 in crypto.createHash (#843)

Fixes #842

Please review carefully - I don't fully understand how this hash is used and whether there are any implications of changing it.
This commit is contained in:
Wojciech Maj
2022-10-26 08:36:17 +02:00
committed by GitHub
parent 5317abb867
commit ff81fbfd9a
+1 -1
View File
@@ -11,7 +11,7 @@ const IGNORE_COMMIT_MESSAGES = ['fork', 'optimize'];
function getContentHashOfFile(path) {
return new Promise((resolve, reject) => {
const hash = crypto.createHash('md4');
const hash = crypto.createHash('sha256');
const stream = fs.createReadStream(path);
stream.on('error', err => reject(err));
stream.on('data', chunk => hash.update(chunk));