PHP rsa get public key from pem file

后端 未结 3 715
清歌不尽
清歌不尽 2021-01-15 05:05

How can i get publickey from pem file which is created based on rsa 364. installed crypt(RSA.php) library still getting below error

Fatal error: Call to unde

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-15 05:19

    According to the Crypt_RSA documentation, the Crypt_RSA class doesn't have a loadKey() method. You pass the public key to the constructor as part of an associative array of parameters:

    $rsa_obj = new Crypt_RSA(array('public_key' => $publickey));
    

提交回复
热议问题