How do I encrypt the url parameter values when javascript-jsget transfers values to another page?

Source: Internet
Author: User
Recently, we have encountered the need to use js to upload three values to another page, so that the parameters are not directly displayed in the url and need to be encrypted. how can this problem be solved?

Recently, we have encountered the need to use js to upload three values to another page, so that the parameters are not directly displayed in the url and need to be encrypted. how can this problem be solved?

Reply content:

Recently, we have encountered the need to use js to upload three values to another page, so that the parameters are not directly displayed in the url and need to be encrypted. how can this problem be solved?

Common PHP functionsurlencodeAndurldecode. Another one isbase64_encodeAndbase64_decode, Which is mostly used for image encryption. Here is a link for your reference: several common encryption functions in PHP

Post?

If you do not want to display it behind the url, use form post;
EncodeURIComponent;

You can use Base64.encode64 to decrypt Base64.decode64.

If it is not visible to passers-,
@ The base64_encode that hits the watermark is a good method.
Base64 is only encoding, because no one can decode it...
You can package the three values into json, and then encode the json string with base64.

If it is A jump from A web service A to another web service B, A and B want to use this encrypted communication.
You can refer to the enterprise number encryption solution.
In fact, A and B both know A set of keys, and then A uses the key to encrypt the message and convert it to base64 and pass it to B in the query.

P.s. I can try it out.Style = Original...

The landlord should not want to let others know the parameters, right? So encodeURIComponent and so on will definitely not work, just encoding.

Base64 is not encrypted strictly.

RSA?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.