Is time() a good salt?
问题 I'm looking at some code that I have not written myself. The code tries to hash a password with SHA512 and uses just time() as the salt. Is time() too simple a salt for this or is this code safe? Thanks for the answers and comments. I will sum it up here for the new readers: salt should be different for each user, so if 2 users register at the same time, their salts won't be unique. This is a problem, but not a big one. but salt shouldn't be in any way related to the user, so time() is not a