react-npm-encrypt-decrypt
Advanced tools
Comparing version
{ | ||
"name": "react-npm-encrypt-decrypt", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "The package used to encrypt and decrypt the data dynamically with keys.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,13 +29,2 @@ # CryptoJS JSON Encryption and Decryption | ||
// Your encryption key and initialization vector (IV) from environment variables | ||
const AES_ENC_SECRET_KEY = process.env.REACT_APP_TECHUS_AES_ENC_SECRET_KEY; | ||
const AES_ENC_IV = process.env.REACT_APP_TECHUS_AES_ENC_IV; | ||
// Your JSON data to be encrypted | ||
const jsonData = { key1: 'value1', key2: 'value2' }; | ||
// Encrypt JSON data | ||
const encryptedData = encryptJSONHandler(JSON.stringify(jsonData), AES_ENC_SECRET_KEY, AES_ENC_IV); | ||
console.log('Encrypted Data:', encryptedData); | ||
// Decrypt JSON data from a response | ||
@@ -51,3 +40,2 @@ const responseData = techusDecryptHandler(response.data.edata); | ||
``` |
4122
-10.59%39
-23.53%