i3ekr@i3ekr:~/Desktop$ python 
Python 2.7.13+ (default, Jul 19 2017, 18:15:03) 
[GCC 6.4.0 20170704] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> a = "admin"
>>> b = base64.b64encode(a)
>>> print b
YWRtaW4=
>>> print base64.b64decode(b)
admin
>>> 

 

相关文章: