Hi guys I have a code to generate random unique strings, 12 charactes long.
$random_string = sha1(uniqid(rand(10, 1000), true));
$random_string = substr($random_string , rand(0, strlen($random_string ) - 12), 12);
Is my code above safe for collision? Any suggestions or modification to my above code?
Thanks guys!
uniqidwon't be enough?