Secure password storage

前端 未结 7 855
别那么骄傲
别那么骄傲 2021-01-20 09:22

I\'m developing a web service where users must login. I will store user data in an SQL database and input/output via PHP. But I don\'t want to store it openly. How do I encr

7条回答
  •  借酒劲吻你
    2021-01-20 09:43

    Hash passwords in SHA-1 (sha1 php inbuilt function) with several recursions of salting (same code in the answers above, only loop through several times). This should be sufficient protection, so even if the intruders somehow get their hands on the hashes, they shouldn't be able to crack them...

提交回复
热议问题