phpseclib0.3.9.zip을 다운로드했습니다. 이 코드를 실행하면 아래 오류가 발생합니다. 나는 이유가 무엇인지 모른다.createKey를 실행할 때 RSA를 사용하면 항상 멈추고 오류 보고서가 표시됩니다.
Call Stack
# Time Memory Function Location
1 0.0020 131696 {main}() ..\test1.php:0
2 0.0290 1276184 Crypt_RSA->createKey(???, ???, ???) ..\test1.php:7
3 27.4046 1356352 Math_BigInteger->randomPrime(object(Math_BigInteger)[8], object(Math_BigInteger)[10], bool) ..\RSA.php:662
도움말 감사 할 : 여기
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . 'E:/software/PHPRSA');
include 'Crypt/RSA.php';
$rsa = new Crypt_RSA();
extract($rsa->createKey());
$plaintext = 'terrafrost';
$rsa->loadKey($privatekey);
$ciphertext = $rsa->encrypt($plaintext);
$rsa->loadKey($publickey);
echo $rsa->decrypt($ciphertext);
?>
오류 보고서입니다.