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

@wjsc/remote-config-client

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wjsc/remote-config-client - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

client.js

@@ -15,3 +15,3 @@ const fs = require('fs');

client.get = clientProxy.get(security, client.get, privateKey, passphrase);
client.set = clientProxy.set(security, client.set, publicKey);
client.set = clientProxy.set(security, client.set, privateKey, passphrase, publicKey);

@@ -18,0 +18,0 @@ return client;

const LIMIT = ':';
const get = ( { privateDecrypt, hash }, get, privateKey, passphrase ) => {
const formatNamespace = (secure, privateEncrypt, namespace, privateKey, passphrase) => secure
? namespace + LIMIT + privateEncrypt(namespace, privateKey, passphrase)
: namespace;
const get = ( { privateEncrypt, privateDecrypt }, get, privateKey, passphrase ) => {
return new Proxy(get, {
apply: (target, thisArg, [{ namespace, key, secure = true }, callback]) => {
return target.call(thisArg, {
namespace: namespace + LIMIT + hash(namespace),
namespace: formatNamespace(secure, privateEncrypt, namespace, privateKey, passphrase),
key,

@@ -20,7 +25,7 @@ },

const set = ( { publicEncrypt, hash }, set, publicKey ) => {
const set = ( { privateEncrypt, publicEncrypt }, set, privateKey, passphrase, publicKey ) => {
return new Proxy(set, {
apply: (target, thisArg, [{ namespace, key, value, secure = true }, callback]) => {
return target.call(thisArg, {
namespace: namespace + LIMIT + hash(namespace),
namespace: formatNamespace(secure, privateEncrypt, namespace, privateKey, passphrase),
key,

@@ -27,0 +32,0 @@ value: secure ? publicEncrypt( value, publicKey ) : value,

{
"name": "@wjsc/remote-config-client",
"version": "0.0.6",
"version": "0.0.7",
"description": "",

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

@@ -97,2 +97,3 @@ # remote-config-grpc

Options:
-x, --share Do not encrypt value
-r, --private <path> Private key path

@@ -113,5 +114,4 @@ -p, --passphrase <path> Passphrase

Options:
-x, --share Do not encrypt value
-u, --public <path> Public key path
-r, --private <path> Private key path
-p, --passphrase <path> Passphrase
-n, --namespace <namespace> Config namespace

@@ -118,0 +118,0 @@ -k, --key <key> Config key

const crypto = require("crypto");
const hash = (str, algorithm, options) =>
crypto.createHash(algorithm || 'sha256', options).update(str).digest("hex");
const publicEncrypt = (utf8Data, key) =>

@@ -44,4 +41,3 @@ crypto.publicEncrypt(key, Buffer.from(utf8Data, 'utf8')).toString('base64');

privateDecrypt,
privateEncrypt,
hash
privateEncrypt
}
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