API interface symmetric encryption and decryption function issues

WBOY
Release: 2016-08-08 09:06:52
Original
1077 people have browsed it

I wrote an encryption function and the corresponding decryption function in PHP. When PHP calls the PHP interface, there is no problem. But when the front-end ajax calls my PHP interface, the ajax parameters cannot be encrypted because the front-end cannot use PHP at all. function, should I use js to rewrite my PHP encryption function? Even if you write it out, it is not safe for the js source code to be exposed to the outside. Do you have any good methods? Is there a solution that allows both ajax and PHP to make authorization calls?

Reply content:

I wrote an encryption function and the corresponding decryption function in PHP. When PHP calls the PHP interface, there is no problem. But when the front-end ajax calls my PHP interface, the ajax parameters cannot be encrypted because the front-end cannot use PHP at all. function, should I use js to rewrite my PHP encryption function? Even if you write it out, it is not safe for the js source code to be exposed to the outside. Do you have any good methods? Is there a solution that allows both ajax and PHP to call authorization calls?

Search for Diffie-Hellman key exchange algorithm

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!