python_base64加密解密

Posted xumb

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python_base64加密解密相关的知识,希望对你有一定的参考价值。

一、base64加密、解密

import base64
s = abc
b = base64.b64encode(s.encode()) #加密
result = b.decode()
print(result)

b = base64.b64decode(YWJj) #解密
print(b.decode())

 

以上是关于python_base64加密解密的主要内容,如果未能解决你的问题,请参考以下文章