用python3.x实现base64加密和解密,供大家参考,具体内容如下
加密
base64_encrypt.py
#!/usr/bin/python3
#encoding:utf-8
import base64
var = 1
while var==1:
str_encrypt=input(输入要加密的字符串:\n);
base64_encrypt = base64.b64encode(str_encrypt.encode('utf-8'))
print(BASE64加密串:\n+str(base64_encrypt,'utf-8'))
print(按ctrl+c
1