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

ecies-lite

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecies-lite - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

index.js

@@ -17,5 +17,5 @@ const crypto = require('crypto');

exports.config = (curveName, cipherAlgorithm, ivSize) => {
config.curveName = curveName;
config.cipherAlgorithm = cipherAlgorithm;
config.ivSize = ivSize;
config.curveName = curveName || config.curveName;
config.cipherAlgorithm = cipherAlgorithm || config.cipherAlgorithm;
config.ivSize = ivSize || config.ivSize;
};

@@ -75,3 +75,3 @@

let mac = crypto.createHmac('sha256', macKey).update(Buffer.concat([epk, iv, ct])).digest();
if (mac.compare(body.mac) !== 0)
if (mac.compare(body.mac) !== 0 || body.mac.compare(mac) !== 0)
throw new Error('Corrupted Ecies-lite body: unmatched authentication code');

@@ -78,0 +78,0 @@ let decipher = crypto.createDecipheriv(opts.cipherAlgorithm || config.cipherAlgorithm, encKey, iv);

{
"name": "ecies-lite",
"version": "1.0.5",
"version": "1.0.6",
"description": "A lightweight ECIES tool implemented in pure Node.JS",

@@ -5,0 +5,0 @@ "main": "index.js",

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