CodeIgniter Forums
get the hashed password - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: get the hashed password (/showthread.php?tid=76386)



get the hashed password - hoadang - 05-08-2020

I am trying to use bcrypt and I know that the hash is always different when the bcrypt is used, but I am told that I should get the hashed password from the database, and use the non hashed password from the login form, use some method magic, and hey, it should work, right?

I won't paste all the code, just sections that are for the password.

Well, for me that isn't the case and I was wondering if you can take a look my code below. Also its not complete, some things you will see just to test.


RE: get the hashed password - jreklund - 05-08-2020

Hi, you can read more about how to use password_hash and password_verify here:
https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence


RE: get the hashed password - InsiteFX - 05-09-2020

Paragon Initiative Enterprises Blog

Implementing Secure User Authentication in PHP Applications with Long-Term Persistence (Login with "Remember Me" Cookies)

Also you can look at Myth/Auth and see how Lonnie did it. Great for learning.