import base64 name = "王大锤王大锤" # 编码: 字符串 -> 二进制 -> base64编码 b64_name = base64.b64encode(name.encode()) print(b64_name) # b'546L5aSn6ZSk' # 解码:base64编码 -> 二进制 -> 字符串 print(base64.b64decode(b64_name).decode())
原创文章,作者:745907710,如若转载,请注明出处:https://blog.ytso.com/273616.html