diff options
Diffstat (limited to 'extensions/crypto/00_crypto.js')
-rw-r--r-- | extensions/crypto/00_crypto.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/extensions/crypto/00_crypto.js b/extensions/crypto/00_crypto.js index a21469a81..449946295 100644 --- a/extensions/crypto/00_crypto.js +++ b/extensions/crypto/00_crypto.js @@ -80,6 +80,7 @@ "verify": { "RSASSA-PKCS1-v1_5": null, "RSA-PSS": "RsaPssParams", + "HMAC": null, }, "importKey": { "HMAC": "HmacImportParams", @@ -690,6 +691,15 @@ signature, }, data); } + case "HMAC": { + const hash = key[_algorithm].hash.name; + return await core.opAsync("op_crypto_verify_key", { + key: keyData, + algorithm: "HMAC", + hash, + signature, + }, data); + } } throw new TypeError("unreachable"); |