New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcrypt_list_algorithms is deprecated #1629
Comments
When mcrypt is available it offers such a SIGNIFICANT speed increase that it is impossible to ignore. I'm talking 45x faster than ANY pure-PHP implementation could EVER hope to achieve. And you want me to just ignore that so I can get a warm fuzzy feeling on the inside that deprecated methods aren't being used? Sorry, but ain't going to happen. See #1028 (comment) for a more in depth elaboration. This is also a dupe of #1512, #1500, #1368, #1229, #1228, #1148, #1134, #1067, #1028, etc |
You're also, in all likelihood, getting that error because you're using a custom error handler. Overall, this leaves us at a bit of an impasse. The two options that I see are:
Both options are suboptimal. |
In doing some testing it looks like phpseclib implementing it's own custom error handler might be a very good solution. The old error handler can be restored after the phpseclib error handler has been enabled. Sample code:
I'll try to implement something like this. That should give us the best of both. People still get the performance boost of mcrypt whilst also enabling custom error handlers. |
Custom error handlers are now used, which I believe should "fix" the issue for those encountering it. (for the record, I hadn't pursued this before because I didn't know you can restore the old error handler until just a few days ago) |
Hey,
file: phpseclib/phpseclib/Crypt/Common/SymmetricKey.php
This won't work on php 7.4 in strict mode:
Function mcrypt_list_algorithms() is deprecated
You should just use your own internal function for this LUL:
in_array($this->cipher_name_mcrypt, phpseclib_mcrypt_list_algorithms());
The text was updated successfully, but these errors were encountered: