An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
January 15, 2022 08:05 am GMT
Original Link: https://dev.to/deepakjaiswal/encryption-decryption-user-details-using-crypto-js-library-to-secure-application-in-react-2ge8
Encryption Decryption User Details Using Crypto-JS Library to secure application in React
hello developers today we talk about a library named is crypto-js
so why we use this library in our development.
because it secure aur informaion from malicius user.
It encrypt our information in cipher text. and we decrypt that text in our
servers file to verify on behalf of secret key.
npm install crypto-js --save
encrypt information
var CryptoJS = require("crypto-js");// Encryptvar ciphertext = CryptoJS.AES.encrypt('user info', 'secret key').toString();
Decrypt information
var CryptoJS = require("crypto-js");var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key');var originalText = bytes.toString(CryptoJS.enc.Utf8);
The main reason using this library because some use check their history to see their payload on login time user inter into the login form. so we can use crypto library to secure application
Original Link: https://dev.to/deepakjaiswal/encryption-decryption-user-details-using-crypto-js-library-to-secure-application-in-react-2ge8
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To