A very simple utility that lets you store secret values in json files.
npm install jsonhide --save
Retrieves secret value in code
stores secret value in code
Generates an RSA key pair
Import an already exisiting json file. Can also contain placeholders that will get extrapolated for secrets.
Creates a json file for encryption/decryption
Given a key, sets a secret value
To read values from code
const path = require('path');
const Hide = require('jsonhide');
const hide = Hide({
configPath: 'config.json',
rsaPrivateKeyPath: path.resolve(__dirname, process.cwd(),'./.jsonhide.private'),
});
const apiKey = hide.getValue('github.apiKey')
console.log(apiKey) // real api key;