json-encrypt-decrypt
v1.0.4
Published
encrypt and decrypt json data
Downloads
13
Readme
json-encrypt-decrypt
Install
$ npm install json-encrypt-decrypt
Usage
Import
Just import json-encrypt-decrypt package in the top of your file for encrypt and decrypt your json data.
const customizeJson = require('json-encrypt-decrypt');
Encrypt
Call encrypt function to encrypt your json data, it will return as string.
const encryptedJson = customizeJson.encrypt(json, secretOrPrivateKey);
Decrypt
Call decrypt function to decrypt your encrypted json data, it will return the original json.
const decryptedJson = customizeJson.decrypt(encryptedJson, secretOrPrivateKey);