How do you securely store a user's password and salt in MySQL?

前端 未结 8 1622
走了就别回头了
走了就别回头了 2020-12-08 08:44

So, I found out on SO that you\'re supposed to hash the password together with a \"salt\". (The articles can be found here and here.)

Here\'s the code:



        
8条回答
  •  情歌与酒
    2020-12-08 09:00

    A salt is a random number of a fixed length. This salt must be different for each stored entry. It must be stored as clear text next to the hashed password.

    From

    https://www.owasp.org/index.php/Hashing_Java#Why_add_salt_.3F

提交回复
热议问题