Base64 algorithm
1) Solve the problem:
Network transport channels do not support all bytes of transmission
2) Definition:
Base64 is a representation of binary data based on 64 printable characters
3) Elements:
a-za-z0-9+/a total of 64 characters, which is also the origin of the base64 name
4) Space Utilization:
The base64 character is 8 bits, but only 6 bits are useful, and the two bits on the left are always 0
5) Method:
8 and 6 of the least common multiple is 24, the algorithm will be 3 characters 3 characters of the solution of a string, each 3 characters with the corresponding four characters (base64 64 elements), the last insufficient bit default is 0, if 6 bits are all 0, then =, so = can only appear at the end.
6) The decoding of the EG:A,BC is as follows:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7C/BC/wKiom1bW3z_zujUvAACbeHzgJnU952.png "title=" 52c9bf05adfeaa74f24080bd6d1cdf6a.png "alt=" Wkiom1bw3z_zujuvaacbehzgjnu952.png "/>
This article is from "Tiger Brother's Blog" blog, please be sure to keep this source http://7613577.blog.51cto.com/7603577/1746889
Base64 Encryption and decryption algorithm