Skip to content

Commit

Permalink
Fixed invalid arrayify value in browser for SHA2-HMAC (#530).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 1, 2019
1 parent a2d4b29 commit c4a494b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sha2/src.ts/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ export function computeHmac(algorithm: SupportedAlgorithms, key: BytesLike, data
});
}

return "0x" + hash.hmac((<any>hash)[algorithm], arrayify(key)).update(arrayify(data)).digest();
return "0x" + hash.hmac((<any>hash)[algorithm], arrayify(key)).update(arrayify(data)).digest("hex");
}

0 comments on commit c4a494b

Please sign in to comment.