Home >Common Problem >What is the use of base64 encoding?
The uses of base64 encoding: 1. Convert non-ASCII character data into ASCII characters; 2. Especially suitable for fast data transmission under http and mime protocols; 3. The data content is encoded for transmission, which is safe and simple .
Use of base64 encoding:
1. Function of Base64
Because only ASCII characters can be used in some systems. Base64 is a method used to convert non-ASCII character data into ASCII characters.
base64 is particularly suitable for fast data transmission under http and mime protocols.
base64 is actually not an encryption and decryption algorithm in the security field. Although sometimes we often see so-called base64 encryption and decryption. In fact, base64 can only be regarded as an encoding algorithm, encoding the data content to suit transmission. Although the original text becomes an invisible character format after base64 encoding, this method is very elementary and simple.
##2. Base64 encoding application
Base64 encoding can be used to transmit longer identification information in theHTTP environment. For example, in
Java Persistence system
Hibernate, Base64 is used to encode a longer unique identifier (usually a 128-bit UUID) into a string, using Make parameters in HTTP form and
HTTP GET URL. In other applications, it is often necessary to encode binary data into a form suitable for placement in a URL (including hidden form fields). At this time, using Base64 encoding is not only shorter, but also unreadable, that is, the encoded data will not be directly visible to the naked eye.
ANSI SQL.
3. Other applications
1) Mozilla Thunderbird and Evolution use Base64 to keep email passwords secret 2) Base64 is also often used as a Simple "encryption" protects some data, while real encryption is often more cumbersome. 3) Spammers use Base64 to evade anti-spam tools, because those tools usually do not translate Base64 messages. 4) In LDIF files, Base64 is used as the encoded string.The above is the detailed content of What is the use of base64 encoding?. For more information, please follow other related articles on the PHP Chinese website!