[eluser]Md. Iftekharul Islam Sakib[/eluser]
I am encrypting the userid and password before saving to database. When user wants to login, the user give his/her login id and password. But now if I encrypt the given userid to find out the savedpassword in databse it doesn't work.
This is because in codeigniter encryption of a same value doesn't return same value
Code:
$msg = 'My secret message';
$encrypted_string1 = $this->encrypt->encode($msg);
$encrypted_string2 = $this->encrypt->encode($msg);
Now, if i first find out all the username and password first & then decode them to find the correct password it will be very unefficient.
How To cope up with this problem.
Thank You in advance for help.