The ASE64 encoding converts binary data to four byte readable characters per three bytes, and the encoded character length is approximately 136.1%. The character range is a-Z a-Z 0-9 \ +. But the encoded string is not very suitable for the use of URL transmission, Chinese encryption after the garbled also many because of this cause: in the URL of the transfer when the + number will be replaced by a space, and every 76 characters will be added a newline "\ n", the line-break match will be lost.
For example:
haha haha haha ....
haha haha haha ....
haha haha haha ....
will be encoded as:
uf65/rn+uf65/rn+oaoho6gjdqoncrn+uf65/rn+uf65/qgjoaohow0kdqq5/rn+uf65/rn+uf6h\no6gjoam=
When transferred in a URL, it becomes:
Uf65/rn uf65/rn oaoho6gjdqoncrn uf65/rn uf65/qgjoaohow0kdqq5/rn uf65/rn uf6h
o6gjoam=
Parsing must be problematic.
So in the transmission and decryption to do the following processing:
1. Remove \ n
2. Replace the space with +
Base64 encryption of Chinese characters