react-npm-encrypt-decrypt v1.0.65
CryptoJS JSON Encryption and Decryption
This module provides functions for encrypting and decrypting JSON data using the CryptoJS library.
Installation
npm i react-npm-encrypt-decrypt
Usage
Add the following lines to your .env file:
REACT_APP_TECHUS_AES_ENC_SECRET_KEY="your-secret-key"
REACT_APP_TECHUS_AES_ENC_IV="your-initialization-vector"
Note: 1. For obtaining the encryption keys, please contact hbabu@compindia.com. 2. For suggestions, feedback, or requests, please feel free to reach out to us via email at hbabu@compindia.com. We value your input and strive to implement your suggestions.
Implement the techusDecryptHandler, and techusEncryptHandler to your code like
const { techusDecryptHandler, techusEncryptHandler } = require('react-npm-encrypt-decrypt');
// Decrypt JSON data from a response
const responseData = techusDecryptHandler(encData);
console.log('Decrypted Data:', responseData);
console.log(JSON.parse(responseData));
// Encrypt data before sending
const dataToEncrypt = { someKey: 'someValue' };
const encryptStr = techusEncryptHandler(dataToEncrypt);
console.log('enc Data str', encryptStr)
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago