Ask HN: What hashing algorithm does goo.gl use?
6 comments
It's not a pure hash; the same URL can be used many times to generate independent URLs. Using only the input of 'http://google.com generated the following URLs in a brief test:
It's likely not hash at all, just a unique identifier.
I assume they're just random numbers encoded in "base 62" or similar.
http://birdhouse.org/blog/2010/10/24/base62-urls-django/
http://birdhouse.org/blog/2010/10/24/base62-urls-django/
It would be base72; they use all the lowercase numbers, all the uppercase numbers, and all the digits.
How is it base72?
A-Z = 26
a-z = 26
0-9 = 10
26 + 26 + 10 = 62derp. The GP's page said "... goal page URIs consisting of characters from this set:
BASE62 = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
I missed the numbers in the middle. How embarrassing. Time to get offline...