mirror of
https://github.com/danbulant/jose
synced 2026-05-24 20:41:46 +00:00
refactor: remove workaround for a bugged v15.2.x webcrypto
This commit is contained in:
parent
4e1ede4dbb
commit
0e9e6e79cf
1 changed files with 2 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue