DEV Community

himanshu rathi
himanshu rathi

Posted on

I need to encrypt and decrypt data between Reactjs and python

how can I encrypt and decrypt data between Reactjs and python mean need to encrypt data from Frontend(Reactjs) and need to decrypt data from the backend (Django python)

Top comments (6)

Collapse
 
crimsonmed profile image
Médéric Burlet

Do you really need encryption? If you use HTTPS you already have encryption in the communication.

Collapse
 
himanshurathi profile image
himanshu rathi

yeah I am using HTTPS but some key and its value is visible in preview of network tab

Collapse
 
crimsonmed profile image
Médéric Burlet • Edited

Clearly you have a misunderstanding on how HTTPS protocol works. It stops people wiretapping (ie: wireshark) your browser intercepts data pre packet encryption and transmission.
youtube.com/watch?v=T4Df5_cojAs

Collapse
 
decentralizuj profile image
decentralizuj

CryptoJS is JavaScript for client side encryption. Google it, plenty of tuts. Server description is easy, you can even use system gpg command if you are on Linux.

Collapse
 
danidiaztech profile image
Daniel Diaz

Why not let Django Rest Framework do the hard job?

Collapse
 
himanshurathi profile image
himanshu rathi • Edited

because I am sending data from frontend to the backend