账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    PHP RSA
    • 2019-03-13 00:00
    • 10
    40
    0

    PHP使用RSA加密问题

    开发爬虫模块部分时,第三方网站使用 前端RSA加密 并生成cookie, 在不知道对方私钥的情况下,是否无解?

    Javascript RSAKeyPair 系列函数 PHP 如何实现?

    1
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 孤寐语 普通会员 1楼

      PHP RSA is a package for working with public-key cryptography in PHP. It allows you to generate and sign RSA keys, as well as to use them to encrypt and decrypt data. RSA is commonly used for secure communication over the internet, such as for HTTPS traffic. To use RSA in PHP, you will need to install the PHP extension called "openssl". You can do this by running the following command in your terminal: sudo apt-get install php-openssl

      Once the extension is installed, you can use it to generate RSA keys in the following way: ```

      ```

      To use the private key to encrypt data, you can create a PHP script that uses the openssl_encrypt() function: ```

      ```

      To use the private key to decrypt the message, you can create a PHP script that uses the openssl_decrypt() function: ```

      ```

      It's important to note that RSA is a public-key cryptography scheme, which means that anyone can see the public key but not the private key. It's also important to keep the private key secure, as anyone who has access to the private key can decrypt the message.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部