Python uses the base64 module to process base64 encoding.
The base64 module is used for base64 encoding and decoding. This encoding method is very common in email.It can encode binary data that cannot be displayed as text information to be displayed.
Base64 Is based on 64 Printable characters to represent the representation of binary data. Because 26 = 64 , So every 6 It is a unit that corresponds to a printable character. Three bytes in total 24 Bit, corresponding 4 Items Base64 Unit, that is 3
Base64 encoding. First, we should clarify why there is a 64 character in it? In fact, because the encoding uses 64 plain text to encode arbitrary binary files, it only uses the A-Z, A-Z, 0-9, +,/This 64 characters, some people who have "a little
Android client uploads images to the server and uses XML to transmit base64-encoded ImagesI use the httpclient of Android to send post requests. I also want to use the post method to send data. However, the data is saved during base64 decoding on
Statement: This article is intended for technical exchanges and is not intended for the "square" (the new version of the square educational administration system password processing method has also changed, just use this as an introduction ......)!
I. Brief description
MD5: All called message digest algorithm 5 (Information digest algorithm), can be encrypted, but not decrypted, belong to one-way encryption, usually used for file verification
BASE64: The 8-bit byte of any sequence is
Base64 is one of the most common encoding methods for transmitting 8Bit bytes of code on the network , and you can view rfc2045~rfc2049, which has a detailed specification of MIME. BASE64 encoding can be used to pass longer identity information in
How to Use the base64 module to process character encoding in Python
This article describes how to use the base64 module to process character encoding in Python. The sample code is based on Python 2.x. For more information, see
Base64 is a method
This article mainly introduces the use of Base64 module in Python to process character encoding tutorial, sample code based on the python2.x version, the need for friends can refer to the
Base64 is a method that uses 64 characters to represent
First, Base64 coding principle
Step 1: Convert all characters to ASCII code;
Step 2: Convert the ASCII code into a 8-bit binary;
Step 3: The binary 3 grouped into a group (less than 3 in the back of 0) a total of 24, and then split into 4 groups,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.