I made a registration form in which the user submitted his username and password. If the username exists, I will decrypt the password and check if it matches the password provided.
// This is from db
string(50) "v+bNPHNWHGQbcxrvu1vN8Ty++cMq0oEeaZesvfCfsLgNAFgZno"
// And this is after decoding the line above
string(32) "�� U�U{q�0�4��è€UC��o�/�*�."
But he must return 123456
For coding I use
$this->encrypt->encode('123456');
And this is the secret key
$config['encryption_key'] = 'kRlaMneym7rF';
// Edit
The problem was that the password field was set to varchar 50
source
share