import base64 str=‘admin‘ str=str.encode(‘utf-8‘) #加密 bs64=base64.b64encode(str) #解密 debs64=base64.b64decode(bs64) print(debs64.decode("utf-8")) #base32bit加密 bs32=base64.b32encode(str) #b32解密 debs32=base64.b32decode(bs32) print(debs32.decode("utf-8"))
原文:https://www.cnblogs.com/SunshineKimi/p/10903184.html