我的印象是 phpseclib 不需要 openssl 但是当我尝试以下代码时......
$rsa = new Crypt_RSA();
$key = $rsa->createKey();
如果它使用 openssl 函数,我会收到以下错误。有点困惑。
Warning: openssl_pkey_export(): cannot get key from parameter 1 in /RSA.php on line 509
Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in /RSA.php on line 510
Warning: array_values() expects parameter 1 to be /RSA.php on line 513
Warning: call_user_func_array() expects parameter 2 to be array, null given in /RSA.php on line 513
Warning: array_values() expects parameter 1 to be array, boolean given in /RSA.php on line 514
Warning: call_user_func_array() expects parameter 2 to be array, null given in /RSA.php on line 514