How do you create “good” random md5 hashes in php?
问题 For several cases I would need to create random md5 hashes. Do you know what the best / most secure ways of doing this are? Some use cases Verifying an email address Resetting passwords Some kind of session id used for authentication, instead of password (eg: when someone hits "remember me", I would not like to store the pass in a cookie) Background I know that rand() should not be used for security relevant applications. For that reason I went with: md5( uniqid(mt_rand(),true) ); Now I read