What function to use to hash passwords in MySQL?

前端 未结 5 1999
忘了有多久
忘了有多久 2020-12-19 00:53

I have a user table in my mysql database that has a password column. Currently, I use the MD5 algorithm to hash the users\' password for storage in the database. Now I like

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 01:39

    MD5 and SHA-1 probably aren't recommended anymore due to know attacks. But, they're still generally sufficient for most use cases.

    If you're looking for more options, just use PHP's hash functions -- you've got plenty of options there.

提交回复
热议问题