CodeIgniter Forums
Password hashing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Password hashing (/showthread.php?tid=62715)



Password hashing - Pradnya - 08-18-2015

I am using password_hash to hash password before storing it to the database. And using password_verify() to verify password while login process. I am not able to login to the system. I am using password_hash() while registering user and changing password of the user.

After entering login details it just display me same login page without any validation errors.

What can I use to solve this problem??


RE: Password hashing - mwhitney - 08-18-2015

We would need to see your code to help you troubleshoot the problem. Also, make sure you're storing the hash in a large enough database field. Generally, you can get away with using a varchar(60), but it is recommended that you use a varchar(255). If you're using less than 60, you may already have found your problem.


RE: Password hashing - Pradnya - 08-19-2015

(08-18-2015, 06:23 AM)mwhitney Wrote: We would need to see your code to help you troubleshoot the problem. Also, make sure you're storing the hash in a large enough database field. Generally, you can get away with using a varchar(60), but it is recommended that you use a varchar(255). If you're using less than 60, you may already have found your problem.

Thanks for reply, I am using varchar(255). I will check my code once again


RE: Password hashing - Paradinight - 08-22-2015

Use ion auth as Loginsystem. It is easy to use.