Js encryption at the front desk and php decryption at the back desk are safe ways


The foreground submission form encrypts the fields,
The background is decrypted with php. Is there any good encryption method?
Thank you!

Js encryption is used at the front end and php decryption is used at the back end. After all, js at the front end is open source code. No matter what encryption method is used, it can always be cracked by analyzing the source code. However, the secret key method is open to users. Anyone can use the secret key to forge data and cannot realize secure encryption.

General requirements can simply use some source code confusion, really high security requirements of places using js encryption is not very reliable. Of course, it is a good way to enable https in order to solve the risks of interception, tampering and data leakage during the transmission of requests.