25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

characters that are known to be mail-safe. As noted in the previous section, there<br />

are only 73 safe characters, so the maximum byte length usable is 6 bits, which<br />

can be represented by 64 unique characters (thus the name Base64). Because<br />

the input <strong>and</strong> output are both byte streams, the encoding has to be done in<br />

groups of 24 bits (that is 3 input bytes <strong>and</strong> 4 output bytes). The process can be<br />

seen as shown in Figure 15-8.<br />

Figure 15-8 MIME: Base64 encoding - How 3 input bytes are converted to 4 output bytes<br />

in the Base64 encoding scheme<br />

The translate table used is called the Base64 alphabet, as shown in Table 15-4.<br />

Table 15-4 The Base64 alphabet<br />

Base64<br />

value<br />

ASCII<br />

char<br />

Base64<br />

value<br />

ASCII<br />

char<br />

Base64<br />

value<br />

ASCII<br />

char<br />

Base64<br />

value<br />

ASCII<br />

char<br />

0 A 16 Q 32 g 48 w<br />

1 B 17 R 33 h 49 x<br />

2 C 18 S 34 i 50 y<br />

3 D 19 T 35 j 51 z<br />

4 E 20 U 36 k 52 0<br />

5 F 21 V 37 l 53 1<br />

Chapter 15. Mail applications 585

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!