🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
1.0.2

2

package.json
{
"name": "ecies-lite",
"version": "1.0.1",
"version": "1.0.2",
"description": "A lightweight ECIES tool implemented in pure Node.JS",

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

@@ -19,6 +19,6 @@ # ecies-lite

let encEcdh = crypto.createECDH('secp256k1');
encEcdh.generateKeys();
let publicKey = encEcdh.getPublicKey();
let body = ecies.encrypt(publicKey, Buffer.from('This is a very simple test for ecies-lite'));
let ecdh = crypto.createECDH('secp256k1');
ecdh.generateKeys();
let publicKey = ecdh.getPublicKey();
let body = ecies.encrypt(publicKey, Buffer.from('This message is for demo purpose'));
for (let k of Object.keys(body)) {

@@ -28,5 +28,3 @@ console.log(`${k}(${body[k].length}B):`, body[k].toString('base64'));

let decEcdh = crypto.createECDH('secp256k1');
let plain = ecies.decrypt(encEcdh.getPrivateKey(), body);
let plain = ecies.decrypt(ecdh.getPrivateKey(), body);
console.log('Decrypted plain text:', plain.toString('utf-8'));

@@ -38,2 +36,3 @@ ```

ecies-lite - A lightweight ECIES tool implemented in pure Node.JS
Written in 2018 by tibetty <xihua.duan@gmail.com>