mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Updated dependencies. Removed shim from HMAC op and postinstall js-to-mjs step due to CryptoAPI fixes.
This commit is contained in:
parent
38838e4dca
commit
18a9dfffc7
3 changed files with 529 additions and 584 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue