How to use php to encrypt and decrypt url parameters? because base64_encode () is generated too long and is too simple, is there any other way?
Reply to discussion (solution)
You can try js:
For example, JavaScript code involves three functions: escape, encodeURI, and encodeURIComponent. the corresponding three decoding functions are: unescape, decodeURI, and decodeURIComponent.
Base64 is only 1/4 longer than the original string
If you still think it is long, you should consider shortening the original string, not the conversion algorithm.
Because even if the original string length can be maintained, it is difficult to ensure that all characters are applicable to URLs.
Base64 is only 1/4 longer than the original string
If you still think it is long, you should consider shortening the original string, not the conversion algorithm.
Because even if the original string length can be maintained, it is difficult to ensure that all characters are applicable to URLs.
The original string specification has been written by the customer and needs to be encrypted. it is impossible to shorten the original string and the original length can only be kept as much as possible. Base64 is only encoded, not encrypted or non-conforming
Base64 is only 1/4 longer than the original string
If you still think it is long, you should consider shortening the original string, not the conversion algorithm.
Because even if the original string length can be maintained, it is difficult to ensure that all characters are applicable to URLs.
This method is good. thank you for your comments.