The first step is to convert three bytes into four numbers of six bits. Each character in the ASCII standard consists of seven bits. Base64 only uses 6 bits. In conclusion, 6 * 8 = 64 characters) to ensure that the encoded data is printable and readable. None of the special characters available in ASCII is used.
It should be noted that with Base64 each bit is divided into two bits, so the converted data is 33 percent larger, i.e. 1/3 larger! Three bytes of binary data are always divided into six bit units.
2.) What is Base64 used for!
Base64 is an encoding and decoding technique used to convert binary data into an ASCII text format and convert it back again. It is used to transfer HTML inline images, or to transfer data via a protocol that only supports the ASCII format, including email, or in HTTP basic authentication to encode user names and passwords, XML files etc. .. .!