Fix cryptojs hmac implementation

Apparently the bowerized version of cryptojs's WordArray.create doesn't
handle arraybuffers correctly.
This commit is contained in:
lilia 2014-10-31 21:10:01 -07:00
parent 6e86a2b7cf
commit 6e3014895b

View file

@ -30,7 +30,7 @@
assertIsArrayBuffer(key);
assertIsArrayBuffer(input);
return CryptoJS.HmacSHA256(
CryptoJS.lib.WordArray.create(input),
CryptoJS.enc.Latin1.parse(getString(input)),
CryptoJS.enc.Latin1.parse(getString(key))
).toString(CryptoJS.enc.Latin1);
};