base64加解密

# -*- coding: cp936 -*-
import base64

src = "明文数据"
tgt = base64.b64encode(src.encode('UTF-8'))
print(tgt)
src = base64.b64decode(tgt).decode('utf-8')
print(src)
posted @ 2022-02-18 14:24  布都御魂  阅读(53)  评论(0编辑  收藏  举报