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

eciesjs

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eciesjs - npm Package Compare versions

Comparing version 0.3.20 to 0.3.21

2

dist/keys/PublicKey.d.ts

@@ -1,2 +0,2 @@

import { PrivateKey } from "./PrivateKey";
import type { PrivateKey } from "./PrivateKey";
export declare class PublicKey {

@@ -3,0 +3,0 @@ static fromHex(hex: string): PublicKey;

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

exports.aesDecrypt = aesDecrypt;
var crypto_1 = require("crypto");
var node_crypto_1 = require("node:crypto");
var secp256k1_1 = __importDefault(require("secp256k1"));

@@ -27,3 +27,3 @@ var consts_1 = require("./consts");

do {
key = (0, crypto_1.randomBytes)(consts_1.SECRET_KEY_LENGTH);
key = (0, node_crypto_1.randomBytes)(consts_1.SECRET_KEY_LENGTH);
} while (!secp256k1_1.default.privateKeyVerify(key));

@@ -33,4 +33,4 @@ return key;

function aesEncrypt(key, plainText) {
var nonce = (0, crypto_1.randomBytes)(consts_1.AES_IV_LENGTH);
var cipher = (0, crypto_1.createCipheriv)("aes-256-gcm", key, nonce);
var nonce = (0, node_crypto_1.randomBytes)(consts_1.AES_IV_LENGTH);
var cipher = (0, node_crypto_1.createCipheriv)("aes-256-gcm", key, nonce);
var encrypted = Buffer.concat([cipher.update(plainText), cipher.final()]);

@@ -44,5 +44,5 @@ var tag = cipher.getAuthTag();

var ciphered = cipherText.subarray(consts_1.AES_IV_PLUS_TAG_LENGTH);
var decipher = (0, crypto_1.createDecipheriv)("aes-256-gcm", key, nonce);
var decipher = (0, node_crypto_1.createDecipheriv)("aes-256-gcm", key, nonce);
decipher.setAuthTag(tag);
return Buffer.concat([decipher.update(ciphered), decipher.final()]);
}

@@ -26,3 +26,3 @@ {

"build": "npx tsc",
"test": "jest"
"test": "vitest"
},

@@ -33,18 +33,16 @@ "repository": {

},
"version": "0.3.20",
"version": "0.3.21",
"dependencies": {
"@types/secp256k1": "^4.0.6",
"futoin-hkdf": "^1.5.3",
"secp256k1": "^5.0.0"
"secp256k1": "^5.0.1"
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^22.4.1",
"jest": "^29.7.0",
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"undici": "^6.19.7"
"@types/secp256k1": "^4.0.6",
"@types/node": "^22.9.0",
"@vitest/coverage-v8": "^2.1.4",
"typescript": "^5.6.3",
"undici": "^6.20.1",
"vitest": "^2.1.4"
},
"packageManager": "pnpm@9.7.1+sha512.faf344af2d6ca65c4c5c8c2224ea77a81a5e8859cbc4e06b1511ddce2f0151512431dd19e6aff31f2c6a8f5f2aced9bd2273e1fed7dd4de1868984059d2c4247"
"packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
}

@@ -18,3 +18,3 @@ # eciesjs

```bash
npm install eciesjs
npm install eciesjs@v0.3-latest
```

@@ -21,0 +21,0 @@

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