简体   繁体   中英

PHP. PEAR. Crypt_RSA error

I need to create the keys, rsa signature for my data. Do for example on http://phpseclib.sourceforge.net/rsa/examples.html eventually see an error:

Deprecated: Assigning the return value of new by reference is deprecated in Z:\\home\\localhost\\www\\Crypt\\RSA.php on line 228

what am I doing wrong?

It's more a warning, not an error. The code does still work. Try changing your error_reporting level to not include E_DEPRECATED errors.

Thank you all) I had to remove the RSA signature data. Refused Crypt_RSA chose for this purpose http://php.net/manual/en/function.openssl-sign.php

What is your line 228? PEAR's Crypt_RSA's line 228 is this:

https://github.com/pear/Crypt_RSA/blob/master/Crypt/RSA.php#L228

That is indeed deprecated.

phpseclib's Crypt_RSA's line 228 has been a comment or a definition for quite a few versions:

My guess: you're using PEAR's Crypt_RSA and are confusing it for phpseclib's Crypt_RSA. They are not the same thing. PEAR's entire Crypt_RSA (not just a few lines within it but the entire package) is deprecated per pear.net:

http://pear.php.net/package/Crypt_RSA

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM