json-crypt

1.0.2 • Public • Published

json-crypt

Dumping and loading JSON-serializable objects to file

'use strict';
 
const Crypt = require('json-crypt');
 
const myObj = {
    foo: {
        bar: [1, 2, 3]
    }
};
 
Crypt.dump(myObj, 'password!23', './file.ejs')
.then(() => {
   Crypt.load('password!23', './file.ejs')
   .then(obj => obj.foo.bar[0] === 1) 
});
 

CLI

npm i -g json-crypt

jcrypt enc password!23 myfile.json myencryptedfile.ejs

OR

jcrypt dec password!23 myencryptedfile.ejs myfile.json

Readme

Keywords

none

Package Sidebar

Install

npm i json-crypt

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • oakfang