json-file-encrypt 2
json-file-encrypt is a node.js module for encrypting json files, with minimal effort. It uses sha256 and AES 256.
Usage
Require the module:
const jfe = ;
Note: Decryption functions will return false if the key is incorrect / the decryption failed.
Class based usage
//create Instance with "test Key" as the keylet key1 = "test Key"; //Encrypt a string:let encrypted = key1; //returns encrypted string //Decrypt an encrypted stringlet data = key1;
Direct usage
//encrypt a stringlet encrypted = jfe; //decrypt a encrypted stringlet original = jfe;