Create Tinyurl style hash

后端 未结 2 1782
长发绾君心
长发绾君心 2020-12-10 08:17

does anyone know of an algorithm that generates hashes that look like tinyurl hashes from a string (url)

I think the requirements would be

case sensitive sho

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 09:20

    I don't think tinyurl hashes the strings; they have a database ID (1, 2, 3) which is coverted to base 36 (0-9A-Z): http://en.wikipedia.org/wiki/Base_36

提交回复
热议问题