From f9db8840adf3732def416cc69c3ce6f115a20d6e Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Mon, 20 Jun 2022 15:42:33 +0200 Subject: [PATCH] crypto: update Wrapping and unwrapping keys webcrypto example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/43452 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- 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 bc0d107f2f9..3a91d0d5e1c 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,