class - base64

 

 

 


base64 有的字符:

  • A-Z
  • a-z
  • 0-9
  • +
  • /
  • =          pad

Example:

import base64

# encode(in, out),decode(in, out), encodestring(str),decodestring(str)

def main():
    mystring = 'testing'
    before = base64.encodestring(mystring)
    print base64.decodestring(before)

if __name__ == '__main__':
    main()

 

 

 

Creative Commons license icon Creative Commons license icon