python字符串加密解密的三种方法分享(base64 win32com)

539次阅读  |  发布于5年以前

1. 最简单的方法是用base64:

复制代码 代码如下:

import base64

s1 = base64.encodestring('hello world')
s2 = base64.decodestring(s1)
print s1,s2

aGVsbG8gd29ybGQ=\n

hello world

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8