am generating unique api keies using this function and storing into database.
strtoupper( md5( uniqid(rand(), TRUE ) ) );
is thr any possiblities of generating same hash key by above function???
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.
Even though the unique value generated by uniqueid function is really pretty unique, there is considerable probability of collision when using MD5 hash algorithm (i.e. different values will result in the same hash value). In fact, MD5 is considered “cryptographically broken and unsuitable for further use” by US-CERT and if you’re concerned about collisions, you should consider using SHA256/SHA512 algorithms instead.