Convert MD5 to base62 for URL

前端 未结 9 510
再見小時候
再見小時候 2020-12-30 10:43

I have a script to convert to base 62 (A-Za-z0-9) but how do I get a number out of MD5?

I have read in many places that because the number from an MD5 is bigger than

9条回答
  •  庸人自扰
    2020-12-30 11:16

    You may try base62x to get a safe and compatible encoded representation.

    Here is for more information about base62x, or simply -base62x in -NatureDNS.

    shell> ./base62x -n 16 -enc 16AF 
    1Ql
    shell> ./base62x -n 16 -dec 1Ql 
    16AF
    
    shell> ./base62x 
    Usage: ./base62x [-v] [-n <2|8|10|16|32>] <-enc|dec> string 
    Version: 0.60 
    

提交回复
热议问题