Coding-related Basic theory

Source: Internet
Author: User
Tags control characters printable characters
About Base64 encoding
  1. Why do you have Base64 code? Because some network transport channels do not support all bytes, such as traditional mail only supports the transmission of visible characters, such as ASCII code control characters can not be transmitted by mail. The use of this is greatly limited, and it is not possible to send all of the bytes of the binary stream as visible characters. The best way to do this is to do an extension to support the delivery of binary files without changing the traditional protocol. Under such demand, Base64 appeared, Base64 code came into being, Base64 is a representation of binary data based on 64 printable characters.
  2. Principle: See "The Principle of coding –base64 coding"
  3. Some notes:
    • BASE64 encoding is mainly used in the transmission, storage, representation of the field of binary, but also can be used to encrypt, but this kind of encryption is relatively simple, just a glance does not know what content, of course, you can also Base64 character sequences to be customized to encrypt.
    • BASE64 encoding is the process of binary to character, like some Chinese characters with different encoding to binary, the resulting binary is not the same, so the resulting Base64 character is not the same . For example, "Internet" corresponds to the utf-8 format of the BASE64 encoding is "5LIK572R", corresponding to GB2312 format Base64 encoding is "yc/n+a==".
    • ★ Sometimes the transmission on the network in addition to the Base64 encoding after the URL encoding .

Coding-related Basic theory

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.