Updated dependencies. Removed shim from HMAC op and postinstall js-to-mjs step due to CryptoAPI fixes.

This commit is contained in:
n1474335 2018-11-07 12:29:23 +00:00
parent 38838e4dca
commit 18a9dfffc7
3 changed files with 529 additions and 584 deletions

View file

@ -71,13 +71,6 @@ class HMAC extends Operation {
msg = Utils.arrayBufferToStr(input, false),
hasher = CryptoApi.getHasher(hashFunc);
// Horrible shim to fix constructor bug. Reported in nf404/crypto-api#8
hasher.reset = () => {
hasher.state = {};
const tmp = new hasher.constructor();
hasher.state = tmp.state;
};
const mac = CryptoApi.getHmac(CryptoApi.encoder.fromUtf(key), hasher);
mac.update(msg);
return CryptoApi.encoder.toHex(mac.finalize());