This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

react-npm-encrypt-decrypt

1.0.65 • Public • Published

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)

Versions

Current Tags

VersionDownloads (Last 7 Days)Published

Version History

VersionDownloads (Last 7 Days)Published

Package Sidebar

Install

npm i react-npm-encrypt-decrypt

Weekly Downloads

10

Version

1.0.65

License

ISC

Unpacked Size

8.93 kB

Total Files

6

Last publish

Collaborators

  • svaishnavpradeep97