What's the best way to create a short hash, similar to what tiny Url does?

前端 未结 13 1302
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 09:10

I\'m currently using MD5 hashes but I would like to find something that will create a shorter hash that uses just [a-z][A-Z][0-9]. It only needs to be around 5-

13条回答
  •  攒了一身酷
    2020-12-04 10:09

    If you're looking for a library that generates tiny unique hashes from inters, I can highly recommend http://hashids.org/net/. I use it in many projects and it works fantastically. You can also specify your own character set for custom hashes.

提交回复
热议问题