Skip to content

Commit

Permalink
Update assert to prevent hashing strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamen authored and emilbayes committed Aug 29, 2019
1 parent d429747 commit 618e183
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 @@ -211,7 +211,7 @@ function Blake2b (outlen, key, salt, personal) {
}

Blake2b.prototype.update = function (input) {
assert(input != null, 'input must be Uint8Array or Buffer')
assert(input instanceof Uint8Array, 'input must be TypedArray or Buffer')
blake2bUpdate(this, input)
return this
}
Expand Down

0 comments on commit 618e183

Please sign in to comment.