New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jose-node-cjs-runtime

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose-node-cjs-runtime - npm Package Compare versions

Comparing version 3.11.3 to 3.11.4

17

dist/node/cjs/runtime/decrypt.js

@@ -23,17 +23,20 @@ "use strict";

}
let plaintext;
const expectedTag = cbc_tag_js_1.default(aad, iv, ciphertext, macSize, macKey, keySize);
let macCheckPassed;
try {
const cipher = crypto_1.createDecipheriv(algorithm, encKey, iv);
plaintext = buffer_utils_js_1.concat(cipher.update(ciphertext), cipher.final());
macCheckPassed = timing_safe_equal_js_1.default(tag, expectedTag);
}
catch {
}
const expectedTag = cbc_tag_js_1.default(aad, iv, ciphertext, macSize, macKey, keySize);
let macCheckPassed;
if (!macCheckPassed) {
throw new errors_js_1.JWEDecryptionFailed();
}
let plaintext;
try {
macCheckPassed = timing_safe_equal_js_1.default(tag, expectedTag);
const cipher = crypto_1.createDecipheriv(algorithm, encKey, iv);
plaintext = buffer_utils_js_1.concat(cipher.update(ciphertext), cipher.final());
}
catch {
}
if (!plaintext || !macCheckPassed) {
if (!plaintext) {
throw new errors_js_1.JWEDecryptionFailed();

@@ -40,0 +43,0 @@ }

@@ -46,3 +46,3 @@ "use strict";

case 'RS512':
if (key.algorithm.name.toUpperCase() !== 'RSASSA-PKCS1-V1_5' ||
if (key.algorithm.name !== 'RSASSA-PKCS1-v1_5' ||
getHashLength(key.algorithm.hash) !== parseInt(alg.substr(2), 10)) {

@@ -49,0 +49,0 @@ throw new TypeError('CryptoKey does not support this operation');

{
"name": "jose-node-cjs-runtime",
"version": "3.11.3",
"version": "3.11.4",
"description": "(Node.JS CJS Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc