Javascript encryption?

I do not want to use https

http://www.vector.safwanmanpower.com/

enter the username and click any of the buttons, then click the show button you will get any sequence, such as 2-4-5-7 in the notification field, in this sequence that I created using javascript now I want to send this sequence to save to a database that works, but when I send this sequence, it will take place in plain text. I want to encrypt this sequence and then decrypt it on the server using php and save since it is 2-4-5-7 in the database?

how can I do this any javascript encryption that cannot be considered weak, like javascript code is visible to the user?

therefore the average person sniffing will be difficult

how can i encrypt using javascript and decrypt it using php and save in db in the above example?

any other solution will help me

0
source share
3 answers

Is there any special reason why you want this encrypted client side only to decrypt it on the server side? If you want the data not to be caught by the links between the client and server, I would suggest using SSL instead. HTTPS is a good way to ensure security when sending data to the client.

+5
source

The best solution if you do not want someone to sniff what is happening on the net?

Use HTTPS : all messages between the server and clients will be encrypted.

+4
source

how can i do this any javascript encryption that cannot be considered weak as user javascript code?

therefore the average person sniffing will be difficult

JCryption will do this using public key encryption.

+2
source

Source: https://habr.com/ru/post/1274412/


All Articles