Passwords storage, hash() with sha-512 or crypt() with blowfish (bcrypt)?

后端 未结 2 1671
无人及你
无人及你 2021-01-15 01:27

This is my current password hashing procedure in PHP/SQL projects...

  • Take 512bits of per-user salt from /dev/urandom, stored in the user\'s DB record in additi
2条回答
  •  悲&欢浪女
    2021-01-15 02:00

    If you can wait til php 5.5, there will be some helpful functions for this built in:

    https://gist.github.com/3707231

    Till then, use crypt - you could look at this forward compatible port of the new functions:

    https://github.com/ircmaxell/password_compat

提交回复
热议问题