Reputation: 583
I understand that sha1() is not secured, but my client's website uses something like this to hash passwords:
$salt = '123abckkk';
$hash = sha1($salt.$password);
Now I'm guessing that if someone breaks into the database and steals the hashes, then they won't be able to crack them because none of the hashes would have come from common words, because they have that '123abckkk' mixed up in it.
Not sure if this is how it works, but if this is not a secure method then please tell me why.
Upvotes: 3
Views: 5935
Reputation: 10975
You should not use md5
or sha1
to hash passwords, instead use password_hash
.
Hashes should be unique and not a set string such as 123abckkk
.
Upvotes: 2