Package Exports
- json-file-encrypt
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-file-encrypt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
#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 = require("json-file-encrypt");Class based usage
//create Instance with "test Key" as the key
let key1 = new jfe.encryptor ("test Key");
//Encrypt a string:
let encrypted = key1.encrypt("some string"); //returns encrypted string
//Decrypt an encrypted string
let data = key1.decrypt(encrypted);Direct usage
//encrypt a string
let encrypted = jfe.encrypt("key", "string data");
//decrypt a encrypted string
let original = jfe.decrypt("key", encrypted);