网络编程
位置:首页>> 网络编程>> Python编程>> Python base64编码解码实例

Python base64编码解码实例

作者:junjie  发布时间:2022-06-11 07:08:27 

标签:Python,base64,编码,解码

Python中进行Base64编码和解码要用base64模块,代码示例:


#-*- coding: utf-8 -*-
import base64

str = 'cnblogs'
str64 = base64.b64encode(str)
print str64           #Y25ibG9ncw==
print base64.b64decode(str64)  #cnblogs
0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com