From db92e006dbde25d689253ee3355c1408af0a5f05 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Thu, 16 Jun 2022 17:27:21 +0200 Subject: [PATCH] crypto: update Wrapping and unwrapping keys webcrypto example --- doc/api/webcrypto.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 6377bb32bfa27c..aae1270e400f96 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -226,7 +226,7 @@ async function generateAndWrapHmacKey(format = 'jwk', hash = 'SHA-512') { const wrappedKey = await subtle.wrapKey(format, key, wrappingKey, 'AES-KW'); - return wrappedKey; + return { wrappedKey, wrappingKey }; } async function unwrapHmacKey( @@ -238,7 +238,7 @@ async function unwrapHmacKey( const key = await subtle.unwrapKey( format, wrappedKey, - unwrappingKey, + wrappingKey, 'AES-KW', { name: 'HMAC', hash }, true,