In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the knowledge about "php rsa encryption, decryption, signature, and public key usage of signature verification". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
php rsa encryption, decryption, signature, signature verification
Since the docking third-party organization uses the Java version of the rsa encryption and decryption method, all the PHP versions of rsa encryption and decryption have just been found on the Internet, but most of the docking java is not applicable.
The following php version is suitable for docking java interface, java is suitable for key and php language use is required to add
-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----
Use key:
encryption public key public_key.cer
decryption private key private_key.key
sign_key.key
public key verified.cer
Note:
Sometimes after encryption with base64_encode, in the form of GET to other pages, decryption with base64_decode, garbled.
When I encounter this problem, I wonder why some of them can be decrypted correctly, but some of them appear garbled?
Later, after checking, we found that there are some Chinese characters. When they are passed in GET form, the + sign will be replaced by a space.
In order to prevent the occurrence of garbled, I did a step replacement, and then decrypted, sure enough, garbled problem, no longer exists!
For example, if you pass an oid variable in the form of GET, then when decrypting and restoring, replace the space with a + sign. Then the output is normal.
$oid=base64_decode(str_replace(" ","+",$_GET[oid]));
"php rsa encryption, decryption, signature, verification of the public key usage" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.