summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorFilip Skokan <panva.ip@gmail.com>2022-10-15 07:23:35 +0200
committerGitHub <noreply@github.com>2022-10-15 10:53:35 +0530
commit225d516466a37a3695e051ca29456e424cb99aa2 (patch)
tree0ea582b946264f45bd778a406a98e7c207635343 /cli
parente7d7585065a70ea388bfccce3681671d25f737b4 (diff)
fix(ext/crypto): correct HMAC get key length op (#16201)
fixes #16180 `HMAC`'s `get key length` `op` uses the hash function's block size, not output size. refs https://github.com/cloudflare/workerd/issues/68#issuecomment-1271189657
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/webcrypto_test.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/tests/unit/webcrypto_test.ts b/cli/tests/unit/webcrypto_test.ts
index 48d7012db..13fb2d3f7 100644
--- a/cli/tests/unit/webcrypto_test.ts
+++ b/cli/tests/unit/webcrypto_test.ts
@@ -675,7 +675,7 @@ Deno.test(async function testDeriveKey() {
const algorithm = derivedKey.algorithm as HmacKeyAlgorithm;
assertEquals(algorithm.name, "HMAC");
assertEquals(algorithm.hash.name, "SHA-256");
- assertEquals(algorithm.length, 256);
+ assertEquals(algorithm.length, 512);
});
Deno.test(async function testAesCbcEncryptDecrypt() {