Base64编码

Encode配置

Decode配置

Base64

import base64

print base64.b64encode("hello world")
print base64.b64decode("aGVsbG8gd29ybGQ=")
    

Base16

import base64

print base64.b16encode("hello world")
print base64.b16decode("68656C6C6F20776F726C64")
    

Base32

import base64

print base64.b32encode("hello world")
print base64.b32decode("NBSWY3DPEB3W64TMMQ======")
    

Base36

下载

Base58

git clone https://github.com/keis/base58.git
python setup.py install
    
import base58

print base58.b58encode(b'hello world')
print base58.b58decode(b'StV1DL6CwTryKyV')
print base58.b58encode_check(b'hello world')
print base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh')
    

Base62

git clone https://github.com/suminb/base62.git
python setup.py install
    
import base62

print base62.encode(590996557886084973)
print base62.decode('helloworld')

print base62.encodebytes(b'hello world')
print base62.decodebytes('AAwf93rvy4aWQVw')
    

Base85 - Python3

import base64

print(base64.a85encode(b"hello world"))
print(base64.a85decode("BOu!rD]j7BEbo7"))

print(base64.b85encode(b"hello world"))
print(base64.b85decode("Xk~0{Zy<MXa%^M"))
    

Base91

下载

Base92

import base92

print(base92.encode(b'hello world'))
print(base92.decode('Fc_$aOTdKnsM*k'))