Sinisterly
How to hash password correctly in PHP? - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: PHP (https://sinister.li/Forum-PHP)
+--- Thread: How to hash password correctly in PHP? (/Thread-How-to-hash-password-correctly-in-PHP)

Pages: 1 2 3


How to hash password correctly in PHP? - Sikom - 05-29-2017

Hey, I am working on an authentication system, and therefor I find the need to hash the passwords like one should do.

So what I am wondering, how would one go about hashing a password in PHP. I guess there are multiple methods. The tutorial I am using is currently using
Code:
password_hash($password, PASSWORD_DEFAULT);

Thanks ^.^


RE: How to hash password correctly in PHP? - Pikami - 05-29-2017

In my opinion everyone should use BlowFish
In php you can get the hash by:
Code:
$hash = password_hash($passwod,CRYPT_BLOWFISH);
And you verify it with:
Code:
password_verify($password,$hash)



RE: How to hash password correctly in PHP? - Ecks - 05-29-2017

Salt your hashes and check out https://www.youtube.com/user/Computerphile


RE: How to hash password correctly in PHP? - Sikom - 05-29-2017

(05-29-2017, 10:38 PM)n3r0x1d3 Wrote: Salt your hashes and check out https://www.youtube.com/user/Computerphile

I am already subscribed to that channel, which videoes are you recommending that I watch? The ones from Tom Scott?


RE: How to hash password correctly in PHP? - Ecks - 05-29-2017

Tom's https://www.youtube.com/watch?v=b4b8ktEV4Bg&list=PLzH6n4zXuckqmf_xUcvU5caZVoctP2ehL is good, but I also recommend Dr. Mike's updates like https://www.youtube.com/watch?v=7U-RbOKanYs or https://www.youtube.com/watch?v=ciNHn38EyRc , Then again I recommend all of their videos for everyone lol.


RE: How to hash password correctly in PHP? - Sikom - 05-30-2017

(05-29-2017, 11:14 PM)n3r0x1d3 Wrote: Tom's https://www.youtube.com/watch?v=b4b8ktEV4Bg&list=PLzH6n4zXuckqmf_xUcvU5caZVoctP2ehL is good, but I also recommend Dr. Mike's updates like https://www.youtube.com/watch?v=7U-RbOKanYs or https://www.youtube.com/watch?v=ciNHn38EyRc , Then again I recommend all of their videos for everyone lol.

I am quite sure I have watched both of them


RE: How to hash password correctly in PHP? - Ecks - 05-30-2017

This tut might be of worth looking as well, https://crackstation.net/hashing-security.htm


RE: How to hash password correctly in PHP? - Sikom - 05-30-2017

(05-30-2017, 06:49 AM)n3r0x1d3 Wrote: This tut might be of worth looking as well, https://crackstation.net/hashing-security.htm

It was a nice tut, but I am still not 100% sure how I would do it in a good manner


RE: How to hash password correctly in PHP? - Jakub - 08-25-2017

Im hashing passwords on my websites/scripts using double md5 + salt and i personally prefer this way.


RE: How to hash password correctly in PHP? - Sikom - 08-25-2017

(08-25-2017, 09:51 PM)Jakub Wrote: Im hashing passwords on my websites/scripts using double md5 + salt and i personally prefer this way.

md5 is not really secure though is it?