From 0e9e6e79cf48d9fce298713b423eb04cdf063727 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 16 Dec 2020 18:37:01 +0100 Subject: [PATCH] refactor: remove workaround for a bugged v15.2.x webcrypto --- src/runtime/browser/decrypt.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/runtime/browser/decrypt.ts b/src/runtime/browser/decrypt.ts index 98eb04b7..254daa80 100644 --- a/src/runtime/browser/decrypt.ts +++ b/src/runtime/browser/decrypt.ts @@ -37,8 +37,7 @@ async function cbcDecrypt( try { plaintext = new Uint8Array( - // TODO: remove .buffer when https://github.com/nodejs/node/issues/36083 is fixed - await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext.buffer), + await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext), ) } catch { // @@ -85,8 +84,7 @@ async function gcmDecrypt( tagLength: 128, }, encKey, - // TODO: remove .buffer when https://github.com/nodejs/node/issues/36083 is fixed - concat(ciphertext, tag).buffer, + concat(ciphertext, tag), ), ) } catch (err) {