2.1.2 • Published 3 years ago

json-file-encrypt v2.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

#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");

Note: Decryption functions will return false if the key is incorrect / the decryption failed.

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);
2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago