import base64 #字符串编码: encodestr = base64.b64encode(‘abcr34r344r‘.encode(‘utf-8‘)) print(str(encodestr,‘utf-8‘)) 结果:YWJjcjM0cjM0NHI= # 对字符串解码 print base64.decodestring(b)
py3 base64加密
原文:https://www.cnblogs.com/lmh001/p/10268842.html