🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-npm-encrypt-decrypt

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-npm-encrypt-decrypt

The package used to encrypt and decrypt the data dynamically with keys.

1.0.65
latest
npm
Version published
Weekly downloads
10
150%
Maintainers
1
Weekly downloads
 
Created
Source

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:

  • For obtaining the encryption keys, please contact hbabu@compindia.com.
  • 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)

Keywords

crypto

FAQs

Package last updated on 12 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts