Link to home
Start Free TrialLog in
Avatar of Jorge Batres
Jorge BatresFlag for United States of America

asked on

mcrypt_create_iv() is deprecated

Hi, I recently updated my sites to PHP 7.1 and discovered that I have a couple of deprecated functions, and I would like to know if anyone can please help me with a substitute for those functions that would work with PHP 7.1 as I understand they will be obsolete in PHP 7.2 or PHP 8.

The functions are:

mcrypt_create_iv() is deprecated

mcrypt_decrypt() is deprecated
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

These functions are not deprecated according to the online manual.  You can look them up on PHP.net.  The right alternative might depend on what you want to use these functions for.  Please tell us the context, thanks.

Also, this article might be helpful:
https://www.experts-exchange.com/articles/28835/Keeping-Secrets-with-PHP.html
Avatar of Jorge Batres

ASKER

Hello Ray and Happy Holidays!

I am using this functions to encrypt and decrypt some values on a reservation form that are uploaded to a database, like credit card and personal information for clients. Currently everything still works, but in anticipation of the next PHP version, I would like to update the code and eliminate  any functions that will be deprecated eventually.

So the reservation form gathers clients information and then it stores the data to a database. My administration PHP script, allows me to work with that data and I can see the encrypted data stored in the database.

I hope this explains the use I have for those functions.
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much Ray, I do have the latest version of OpenSSL installed on my server, so I will be looking into that.

As always, I want to thank you so much for sharing your knowledge with me.

Happy 2017!