I made a login form where the user submit his username and password. If the username exist I decode the password and check if is the same as the submitted password.
// This is from db
string(50) "v+bNPHNWHGQbcxrvu1vN8Ty++cMq0oEeaZesvfCfsLgNAFgZno"
// And this is after decode the string above
string(32) "�� U�U{q�0�4��è€UC��o�/�*�."
But it should return 123456
For encode I use
$this->encrypt->encode('123456');
And this is secret key
$config['encryption_key'] = 'kRlaMneym7rF';
// Edit
The problem was that password field was set to varchar 50