jose-browser-runtime
Advanced tools
Comparing version 3.11.3 to 3.11.4
@@ -14,8 +14,2 @@ import { concat, uint64be } from '../lib/buffer_utils.js'; | ||
}, false, ['sign']); | ||
let plaintext; | ||
try { | ||
plaintext = new Uint8Array(await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext)); | ||
} | ||
catch (_a) { | ||
} | ||
const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3)); | ||
@@ -27,5 +21,14 @@ const expectedTag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3)); | ||
} | ||
catch (_a) { | ||
} | ||
if (!macCheckPassed) { | ||
throw new JWEDecryptionFailed(); | ||
} | ||
let plaintext; | ||
try { | ||
plaintext = new Uint8Array(await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext)); | ||
} | ||
catch (_b) { | ||
} | ||
if (!plaintext || !macCheckPassed) { | ||
if (!plaintext) { | ||
throw new JWEDecryptionFailed(); | ||
@@ -32,0 +35,0 @@ } |
{ | ||
"name": "jose-browser-runtime", | ||
"version": "3.11.3", | ||
"version": "3.11.4", | ||
"description": "(Browser Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123752
3107