I’m trying to use the encryption library to encode passwords in the database. I was using md5 until now but now the application need to be able to decode passwords back somehow.
Using the encryption library, it seems that every time I encrypt a value I get a different encrypted value.
The library is able to decrypt back any of those encrypted values back to the original value but that’s preventing me from doing simple database queries where it should match the encrypted password in the database to an encrypted login value for instance.
Am I missing something? Is there a way to make the library always return the same encrypted value every time?
ps. Development machine is Windows 2k3 with Apache 2 & php 5.2.4 with mcrypt installed. CI is 1.6.3