Quote:
Originally Posted by meglamaniac
A quick and easy way to get a unique ID is to MD5 the IP address that loaded the page combined with the current timestamp. Unless two computers from the same IP load the same page in the exact same second, there will be no conflicts.
To reduce that chance you can add a random number component to the hash string as well.
|
i'm fairly sure there are papers out there proving that two different strings can have the same MD5, so that's not neccessarily true.
from a purely mathamatical perspective (i don't know the md5 algorithm) it would seem that there's a 1 in 2^128 chance of the number being duplicated if you're using a 128 bit md5.