In PHP5 I was able to use mcrypt_module_open
and now in PHP7.2.7 (which I just upgrade to) the function is missing and while searching, I discovered that it has been replaced by OpenSSL
.
My question is this: What is the equivalent of mcrypt_module_open
in OPenSSL
?
The PHP bindings to OpenSSL do not support incremental encryption as mcrypt did with mcrypt_module_open
. The only encryption that's officially supported is one off encryption with openssl_encrypt
and that's it.
If you want to do incremental encryption I would recommend doing https://github.com/phpseclib/mcrypt_compat. That'll use OpenSSL to emulate incremental encryption, if it's available, and a pure-PHP implementation, otherwise.