Skip to content

Commit

Permalink
fix: crash with md4 hash (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Nov 4, 2021
1 parent 097f5c3 commit ef084d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/getHashDigest.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ function getHashDigest(buffer, algorithm, digestType, maxLength) {
} else if (algorithm === "md4") {
if (createMd4 === undefined) {
createMd4 = require("./hash/md4");

if (BatchedHash === undefined) {
BatchedHash = require("./hash/BatchedHash");
}
}

hash = new BatchedHash(createMd4());
Expand Down

0 comments on commit ef084d4

Please sign in to comment.