1.0.4 • Published 1 year ago
json-encrypt-decrypt v1.0.4
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);