NYCPHP Meetup

NYPHP.org

[nycphp-talk] generate random unique 8-digit number

Michael B Allen ioplex at gmail.com
Wed Mar 11 19:03:55 EDT 2009


On Wed, Mar 11, 2009 at 6:16 PM, John Campbell <jcampbell1 at gmail.com> wrote:
> On Wed, Mar 11, 2009 at 5:01 PM, Fernando Gabrieli <fgabrieli at gmail.com> wrote:
>> dont forget that md5($anyString) can return two hashes with the same value
>> (if you have a db with 1,000,000 entries using this, it may happen)
>
> The odds of an MD5 collision with 1,000,000 entries is
> 0.0000000000000000000000000001%
>
> That is a risk I am willing to take.

What if the number is used in a filename to store scanned financial
documents for a large bank?

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/



More information about the talk mailing list