Generate unique ID for URL

Richard richardbp at gmail.com
Wed Nov 14 04:27:17 CET 2012


> The next step is to reduce the number of bits you are encoding.  You 
> 
> said in another post that "1 collision in 10 million hashes would be 
> 
> tolerable".  So you need:
> 
> 
> 
> >>> math.log(10*1000*1000, 2)
> 
> 23.25349666421154


I think a difficulty would be finding a hash algorithm that maps evenly across those bits.


More information about the Python-list mailing list