After that two pad (=) characters are appended to the output. Each 6-bit group is converted to the resulting Base64 encoded character using the Base64 index table. Input has 8 bits remaining at the end: Four zero bits are added to form two 6-bit groups.Then, one or two pad (=) characters are output depending on the following cases. When the input has fewer than 24 bits at the end, zero bits are added (on the right) to form an integral number of 6-bit groups. Finally, each 6-bit group is converted to a single character in the Base64 alphabet by consulting the above Base64 alphabet table. These 24-bit groups are then treated as 4 concatenated 6-bit groups. It processes the input from left to right and organizes the input into 24-bit groups by concatenating three 8-bit bytes. The Base64 encoding process receives input in the form of of 8-bit bytes. Each alphabet is represented by a 6-bit sequence from 0 to 63. The following table displays the list of Base64 alphabets. The extra 65th character ( =) is used to pad the Base64 encoded output. These characters form the Base64 alphabet. The first 64 characters are represented using a 6-bit sequence ( 2 6 = 64). These characters are A-Z, a-z, 0-9, +, /, and =. The decoding process converts the encoded string back to binary data.īase64 encoding uses a subset of 65 characters from the US-ASCII charset. The encoding process converts binary data to a printable ASCII string format. To transfer non-ASCII or binary data over such communication channels, the binary data is encoded to the ASCII charset using Base64 encoding scheme. Many communication protocols like SMTP, NNTP were traditionally designed to work with plain text data represented by the 7-bit US-ASCII character set. Base64 encoding is a binary-to-text encoding/decoding scheme.īase64 encoding is used when any binary data needs to be transmitted over a media that is designed to handle only textual data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |