Hi Martin, MD5 hashes are sufficiently random that collisions are purely theoretical and not of practical concern. Many systems, for example, address files by MD5 or SHA1 hash.
If you can provide an MD5 or SHA1 collision between two short, human-readable strings, however, I will be happy to amend the article with this caveat. Regards, Nick Johnson On Sun, Oct 25, 2009 at 5:40 PM, Martin Trummer <[email protected] > wrote: > > in this article > http://code.google.com/intl/de-DE/appengine/articles/paging.html > the author points out the problems that arise when you use a field > that may not be unique for paging. > the solution is to use a sharded counter over the user to make the > field unique. > > Very fine until here. > But then he suggests to use a MD5-hash-value of the unique value > instead of the real unique value. > > This is obviously wrong: > A hash function, will by definition NOT retain the uniqueness of the > source value! > > Sure, the chances that 2 unique values result in the same hash value > is (and should by definition be) very low: > but we are not satisfied with a "solution" that works most of the > time, are we? > > > > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
