Topic Path: Symbol Reference > Files > IdCoderMIME.pas
ContentsIndexHome
PreviousUpNext
IdCoderMIME.pas

Contains classes, types, variables, and constants used to implement encoders and decoders for the Base64 encoding scheme.

IdCoderMIME.pas contains classes, types, variables, and constants used to implement encoders and decoders for the Base64 encoding scheme as described in the Internet Standards document: 

RFC 2045, Multipurpose Internet Mail Extensions (MIME), Part One: Format of Internet Message Bodies, Section 6.8 Base64 Content-Transfer-Encoding  

The Base64 encoding mechanism is designed to represent arbitrary sequences of byte data in a form that need not be humanly readable. Base64 encoding is almost identical to the mechanism used in Privacy Enhanced Mail (PEM) applications, as defined in 

RFC 1421 - Privacy Enhancement for Internet Electronic Mail, Part I: Message Encryption and Authentication Procedures  

Base64 encoding uses a 64-character subset of US-ASCII, enabling 6 bits to be represented per printable character. An extra character ("=") has special significance in Base64 encoding. Base64 encoding can represent all version of ISO 646, including US-ASCII, and all characters in the subset are also represented identically in EBCDIC. 

Base64 encoding represents 24-bit groups of input as output strings of 4 encoded characters. Proceeding from left to right, a 24-bit input group is formed by concatenating 3 8-bit input groups. These 24 bits are then treated as 4 concatenated 6-bit groups, each of which is translated into a single digit in the base64 alphabet. 

Each 6-bit group is used as an index into an array of 64 printable characters. The character referenced by the index is placed in the output string. These characters are selected to be universally representable, and the set excludes characters with particular significance to SMTP (".", CR, LF) and to the multipart boundary delimiters defined in RFC 2046 ("-"). The following table identifies characters and encodings for the Base64 Alphabet: 

 

Value 
Encoding 
Value 
Encoding 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
10 
44 
11 
45 
12 
46 
13 
47 
14 
48 
15 
49 
16 
50 
17 
51 
18 
52 
19 
53 
20 
54 
21 
55 
22 
56 
23 
57 
24 
58 
25 
59 
26 
60 
27 
61 
28 
62 
29 
63 
30 
(pad) 
31 
 
 
32 
 
 
33 
 
 

 

Base64-encoded output must be represented in lines of no more than 76 characters each. All line breaks or other characters not found in the Base64 alphabet must be ignored by decoding software.

Class 
Description 
Implements a decoder for MIME content encoded using the Base64 encoding scheme. 
 
Implements an encoder for MIME content using the Base64 encoding scheme. 
Constant 
Description 
Represents the valid characters that constitute the Base64 alphabet. 
Variable 
Description 
Identifies the decoding table used by TIdDecoderMIME for the Base64 alphabet. 
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.