How to make absolutely original salt for every user?
Is it better to use time() function in PHP?
How to make absolutely original salt for every user? Is it better to use
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In many cases, a simple
uniqid(mt_rand(), true)will do to generate a random salt. Combined with Blowfish should give you a pretty good password hash.Alternatives are a pseudo random source such as
/dev/urandomoropenssl_pseudo_random_bytes(). There are also services that generate random data for you (based on radio-active degradation).