跳到主要内容

BaseN

BaseNeffchars
Base10~42%0-9
Base1650%0-9A-F
Base3262.5%0-9A-V,2-7A-Z
Base36~64%0-9A-Z
Base643/4, 75%0-9A-Za-z+/.0-9A-Za-z-_
Base854/5, 80%
  • Base10=Decimal
  • Base64 常见补充字符
    • +,/ - 大多数场景
    • -,_ - URL 安全
    • Pad 通常使用 =
    • 3/4 - 数据长度为 3 的倍数则不会有 Padding
  • Base85=Ascii85
    • big-endian
    • used by ZMODEM, Adobe PostScript, PDF, Git Binary Patch
    • Z85 - ZeroMQ Base-85
    • Base85 RFC1924 62 0–9A–Za–z + 23 !#$%&()*+-;<=>?@^_`{|}~
  • 常见视觉混淆字符
    • 0,o,O
    • 1,l,I,i,j
    • 2,z,Z
    • 5,s,S
bitsbytehexb32b64e.g.
3248~7~7int
64816~13~11timestamp,long
128163226~22md5
160204032~27sha1,uuid
2242856~45~38sha2
2563264~52~43sha2-256
320RIPEMD-320
3844896~7764
51264128~103~86whirlpool
1024128256
1280160320256
1536192384256
  • byte=bits/8
  • hex=bits/8/0.5=bits/4
  • base32=bits/8/0.625
  • base64=bits/8/0.75=bits/6

常见

typebitsbytesstring
uuid1281636=32+4
sha116020hex 40
md512816hex 32
  • UUID - 1 million, bytes 节省 20MB