json-decrypt
decrypt (or encrypt) your json configuration (or object) with a password. You can save your key into user environment for decrypt this cfg file
Installation
Install through NPM
npm install json-decrypt
or
git clone git://github.com/hex7c0/json-decrypt.git
API
decrypt your Object key, with an ENV passphrase
var decrypt = decrypt; var cfg = fix: 'ciao' foo: 'hRzVwi8=' pr: 'foo' ; var plaintext_cfg = ;
encrypt your Object key
var encrypt = encrypt; var cfg = fix: 'ciao' foo: 'hex7c' pr: 'foo' ; var ciphertext_cfg = ;
decrypt(obj, index, key [, cipher [, encoding]])
options
obj
- Object Your object (default "required")index
- String Object key (default "required")key
- String Your Key (default "required")cipher
- String Cipher (default "aes-128-ctr")encoding
- String Output encoding (default "base64")
Examples
Take a look at my examples