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

ethereum-encryption

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-encryption - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

6

dist/es/index.js

@@ -74,2 +74,4 @@ import _Map from 'babel-runtime/core-js/map';

var _encryptWithPublicKeyEciesCache = new _Map();
// this key is used as false sample, because bitcore would crash when alice has no privateKey
var _encryptWithPublicKeyDefaultKey = new bitcore.PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
/**

@@ -85,5 +87,3 @@ * encrypts the message with the publicKey

if (!_encryptWithPublicKeyEciesCache.has(publicKey)) {
// this key is used as false sample, because bitcore would crash when alice has no privateKey
var privKey = new bitcore.PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
var _alice = ECIES().privateKey(privKey).publicKey(new bitcore.PublicKey(publicKey));
var _alice = ECIES().privateKey(_encryptWithPublicKeyDefaultKey).publicKey(new bitcore.PublicKey(publicKey));
_encryptWithPublicKeyEciesCache.set(publicKey, _alice);

@@ -90,0 +90,0 @@ }

@@ -109,2 +109,4 @@ 'use strict';

var _encryptWithPublicKeyEciesCache = new _map2['default']();
// this key is used as false sample, because bitcore would crash when alice has no privateKey
var _encryptWithPublicKeyDefaultKey = new _bitcoreLib2['default'].PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
/**

@@ -120,5 +122,3 @@ * encrypts the message with the publicKey

if (!_encryptWithPublicKeyEciesCache.has(publicKey)) {
// this key is used as false sample, because bitcore would crash when alice has no privateKey
var privKey = new _bitcoreLib2['default'].PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
var _alice = (0, _ecies2['default'])().privateKey(privKey).publicKey(new _bitcoreLib2['default'].PublicKey(publicKey));
var _alice = (0, _ecies2['default'])().privateKey(_encryptWithPublicKeyDefaultKey).publicKey(new _bitcoreLib2['default'].PublicKey(publicKey));
_encryptWithPublicKeyEciesCache.set(publicKey, _alice);

@@ -125,0 +125,0 @@ }

{
"name": "ethereum-encryption",
"version": "0.0.4",
"version": "0.0.5",
"description": "Use this to encrypt, decrypt, sign and verify data with an ethereum public- or privateKey",

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

@@ -101,2 +101,4 @@ import * as ethUtil from 'ethereumjs-util';

const _encryptWithPublicKeyEciesCache = new Map();
// this key is used as false sample, because bitcore would crash when alice has no privateKey
const _encryptWithPublicKeyDefaultKey = new bitcore.PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
/**

@@ -112,6 +114,4 @@ * encrypts the message with the publicKey

if (!_encryptWithPublicKeyEciesCache.has(publicKey)) {
// this key is used as false sample, because bitcore would crash when alice has no privateKey
const privKey = new bitcore.PrivateKey('52435b1ff21b894da15d87399011841d5edec2de4552fdc29c8299574436925d');
const alice = ECIES()
.privateKey(privKey)
.privateKey(_encryptWithPublicKeyDefaultKey)
.publicKey(new bitcore.PublicKey(publicKey));

@@ -118,0 +118,0 @@ _encryptWithPublicKeyEciesCache.set(

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