Skip to content

Commit

Permalink
hash.digest() expects 'binary' rather than 'bin'
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Nov 18, 2020
1 parent ef94d7f commit a5a40e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function swarmHashBlock (data, totalLength) {
tmp.writeUIntLE(totalLength, 0, 6)
hash.update(tmp)
hash.update(data)
return Buffer.from(hash.digest('bin'), 'binary')
return Buffer.from(hash.digest('binary'), 'binary')
}

function swarmHash (data) {
Expand Down

0 comments on commit a5a40e5

Please sign in to comment.