4

I was wondering what is the difference between these? I was having a discussion with someone about the crypt method and he was talking about the bcrypt method but to me it sounded like they are the same methods.

Thanks

baihu
  • 451
  • 1
  • 4
  • 16
  • possible duplicate of [How do you use bcrypt for hashing passwords in PHP?](http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php) – Stuart Thomson Dec 11 '13 at 15:10

2 Answers2

1

crypt without arguments is the standard UNIX password hashing function ported to PHP whereas bcrypt is based on the Blowfish algorithm.

Bcrypt was designed specifically for hashing passwords.

Robin Heller
  • 400
  • 5
  • 14
0

Read the documentation:

password_hash() uses strong hash, generates strong salt, applies proper rounds automatically. password_hash() is simple crypt() wrapper and compatible with existing password hashes. Use of password_hash() is encouraged.

There is no bcript function in PHP.

qwertynl
  • 3,912
  • 1
  • 21
  • 43