mcrypt is deprecated, what is the alternative?
It's best practice to hash passwords so they are not decryptable. This makes things slightly more difficult for attackers that may have gained access to your database or files.
If you must encrypt your data and have it decryptable, a guide to secure encryption/decryption is available at https://paragonie.com/white-paper/2015-secure-php-data-encryption. To summarize that link:
- Use Libsodium - A PHP extension
- If you can't use Libsodium, use defuse/php-encryption - Straight PHP code
- If you can't use Libsodium or defuse/php-encryption, use OpenSSL - A lot of servers will already have this installed. If not, it can be compiled with --with-openssl[=DIR]
PHP7.1 mcrypt alternative
You should use openssl_encrypt instead.
How to decrypt after Mcrypt deprecation?
I solved it.
Don't know if its the right way (guess not)
But connected remotely on a server with a lower php version.
Decrypted all the content and encrypted with OpenSSL.
Thanks for the suggestions!
mcrypt_create_iv alternative in PHP 7.3
From the documentation for that function:
Alternatives to this function include:
- random_bytes()
mcrypt is deprecated, what is the alternative?
It's best practice to hash passwords so they are not decryptable. This makes things slightly more difficult for attackers that may have gained access to your database or files.
If you must encrypt your data and have it decryptable, a guide to secure encryption/decryption is available at https://paragonie.com/white-paper/2015-secure-php-data-encryption. To summarize that link:
- Use Libsodium - A PHP extension
- If you can't use Libsodium, use defuse/php-encryption - Straight PHP code
- If you can't use Libsodium or defuse/php-encryption, use OpenSSL - A lot of servers will already have this installed. If not, it can be compiled with --with-openssl[=DIR]
Related Topics
How to Validate an Email in PHP
Call to a Member Function Bind_Param() on a Non-Object
How to Send a Firebase Cloud Messaging Notification Without Use the Firebase Console
How to Truncate a String in PHP to the Word Closest to a Certain Number of Characters
How to Read If a Checkbox Is Checked in PHP
Getting the Location from an Ip Address
How to Prevent Browser Cache For PHP Site
How to Get Numeric Types from MySQL Using Pdo
Calculate Math Expression from a String Using Eval
How to Get Id of the Last Updated Row in MySQL
How to Solve PHP Error 'Notice: Array to String Conversion In...'
How to Use Pdo Connection in Other Classes
How to Get the Current Date and Time in PHP
Laravel Requires the Mcrypt PHP Extension