mirror of
https://github.com/denoland/deno.git
synced 2025-09-30 14:11:14 +00:00
fix(ext/crypto): exportKey() for HMAC (#11737)
Fixes typings and innerKey processing (WPT doesn't test exportKey for HMAC so this wasn't caught earlier).
This commit is contained in:
parent
c67f6c13cd
commit
af97535b7c
3 changed files with 8 additions and 3 deletions
|
@ -160,7 +160,7 @@ unitTest(async function testSignRSASSAKey() {
|
|||
assert(signature);
|
||||
});
|
||||
|
||||
unitTest(async function subtleCryptoHmacImport() {
|
||||
unitTest(async function subtleCryptoHmacImportExport() {
|
||||
// deno-fmt-ignore
|
||||
const rawKey = new Uint8Array([
|
||||
1, 2, 3, 4, 5, 6, 7, 8,
|
||||
|
@ -189,4 +189,7 @@ unitTest(async function subtleCryptoHmacImport() {
|
|||
new Uint8Array(actual),
|
||||
expected,
|
||||
);
|
||||
|
||||
const exportedKey = await crypto.subtle.exportKey("raw", key);
|
||||
assertEquals(new Uint8Array(exportedKey), rawKey);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue