Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jose-node-esm-runtime

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 4.1.4 to 4.1.5

3

dist/node/esm/key/import.js

@@ -65,3 +65,4 @@ import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js';

function spkiFromX509(buf) {
return encodeBase64(getElement(getElement(parseElement(buf).contents)[0].contents)[6].raw);
const tbsCertificate = getElement(getElement(parseElement(buf).contents)[0].contents);
return encodeBase64(tbsCertificate[tbsCertificate[0].raw[0] === 0xa0 ? 6 : 5].raw);
}

@@ -68,0 +69,0 @@ function getSPKI(x509) {

@@ -37,4 +37,4 @@ import { createDecipheriv, KeyObject } from 'crypto';

try {
const cipher = createDecipheriv(algorithm, encKey, iv);
plaintext = concat(cipher.update(ciphertext), cipher.final());
const decipher = createDecipheriv(algorithm, encKey, iv);
plaintext = concat(decipher.update(ciphertext), decipher.final());
}

@@ -55,8 +55,10 @@ catch {

try {
const cipher = createDecipheriv(algorithm, cek, iv, { authTagLength: 16 });
cipher.setAuthTag(tag);
const decipher = createDecipheriv(algorithm, cek, iv, { authTagLength: 16 });
decipher.setAuthTag(tag);
if (aad.byteLength) {
cipher.setAAD(aad, { plaintextLength: ciphertext.length });
decipher.setAAD(aad, { plaintextLength: ciphertext.length });
}
return concat(cipher.update(ciphertext), cipher.final());
const plaintext = decipher.update(ciphertext);
decipher.final();
return plaintext;
}

@@ -63,0 +65,0 @@ catch {

@@ -39,3 +39,4 @@ import { createCipheriv, KeyObject } from 'crypto';

}
const ciphertext = concat(cipher.update(plaintext), cipher.final());
const ciphertext = cipher.update(plaintext);
cipher.final();
const tag = cipher.getAuthTag();

@@ -42,0 +43,0 @@ return { ciphertext, tag };

{
"name": "jose-node-esm-runtime",
"version": "4.1.4",
"version": "4.1.5",
"description": "(Node.JS ESM Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS with no dependencies using runtime's native crypto",

@@ -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