use binary string instead of Uint8Array for forge
This commit is contained in:
parent
ef6631ec87
commit
4161310ed2
@ -56,7 +56,7 @@ exports.sha1Hmac = function (key, bytes) {
|
||||
var forge = window.forge;
|
||||
var hmac = forge.hmac.create();
|
||||
var digest;
|
||||
hmac.start('sha1', key);
|
||||
hmac.start('sha1', Unibabel.bufferToBinaryString(key));
|
||||
hmac.update(Unibabel.bufferToBinaryString(bytes));
|
||||
digest = hmac.digest().toHex();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user