use binary string instead of Uint8Array for forge

This commit is contained in:
AJ ONeal 2015-10-23 00:31:16 -07:00
parent ef6631ec87
commit 4161310ed2

View File

@ -56,7 +56,7 @@ exports.sha1Hmac = function (key, bytes) {
var forge = window.forge; var forge = window.forge;
var hmac = forge.hmac.create(); var hmac = forge.hmac.create();
var digest; var digest;
hmac.start('sha1', key); hmac.start('sha1', Unibabel.bufferToBinaryString(key));
hmac.update(Unibabel.bufferToBinaryString(bytes)); hmac.update(Unibabel.bufferToBinaryString(bytes));
digest = hmac.digest().toHex(); digest = hmac.digest().toHex();