The base-64 encoding
converts a series of arbitrary bytes into a longer sequence of common text
characters that are all legal header field values. Base-64 encoding takes a
sequence of 8-bit bytes, breaks the sequence into 6-bit pieces, and assigns
each 6-bit piece to one of 64 characters comprising the base-64 alphabet. Base
64–encoded strings are about 33% larger than the original values.
For example “Ow!”
-> “T3ch”
1. The string “Ow!”
is broken into 3 8-bit bytes (0x4F, 0x77, 0x21).
2. The 3 bytes
create the 24-bit binary value 010011110111011100100001.
3. These bits are
segmented into the 6-bit sequences 010011, 110111, 01110,100001.
Comments
Post a Comment