![]()
|
TOP --> libjdl
Apply MIME-64 encoding to a string based on the RFC 1521 standards document. This class can be used encode a string of characters in MIME format. It handles binary as well as ASCII strings.
EncodingThe basic idea behind encoding is that the user hands the object a pointer to an input string that is composed of plaintext characters and a pointer to an output string that is at least 33% larger than the input string. The object then encodes the input string to the output string. An example is shown below.
DecodingThe basic idea behind decoding is that the user hands the object a pointer to an input string that is composed of encoded characters and a pointer to an output string that is at least 25% smaller than the input string. The object then decodes the input string to the output string. An example is shown below.
|
| out | The encoded output string. It must be 33% larger than the input string. |
| outlen | The length of the output buffer. |
| in | The input buffer. |
| inlen | The length of the input buffer. |
public void EncodeFile ( const char * out ,
const char * in ) ;
Encode an ASCII file.
| out | The output file name. |
| in | The input file name. |
public uint Decode ( uchar * out ,
uint outlen ,
const uchar * in ,
uint len ) ;
Decode a sequence of characters. This routine will termine the output string with a NULL. Make sure that you account for this during binary conversions.
| out | The decoded output string. |
| outlen | The length of the output buffer. |
| in | The input buffer. |
| inlen | The length of the input buffer. |
public void DecodeFile ( const char * out ,
const char * in ) ;
Decode an ASCII file.
| out | The output file name. |
| in | The input file name. |
public void Reset ( uchar * enc ,
uchar * dec ) ;
Reset the internal encode and decode maps.
| enc | The new encode map. Must be at least 128 chars. |
| dec | The new decode map. Must be at least 128 chars. |
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.