What is SALT and how do i use it?

后端 未结 6 1231
盖世英雄少女心
盖世英雄少女心 2020-11-30 23:53

I have been searching around and I am still unsure of what a \"salt\" is and how to use/implement it. Sorry for the noobish question, I am self learning php.

6条回答
  •  不思量自难忘°
    2020-12-01 00:29

    When I first asked this question, many years ago, I was asked in response, "What does salt do for food?" The answer is that it adds variety to food. The idea behind cryptographic salt is that it's something you add to the end or beginning of a string in order that two passwords that are identical don't hash to the same cryptographic value.

    Consider this - if I had a password that was really common, like 'hello123', and then it hashed to the exact same cryptographic hash as all other 'hello123' passwords, couldn't I just look in the list of hashed passwords to see who else had the same cryptographic hash, and use my password on their account?

提交回复
热议问题