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.
CJdlMime mime; uchar *plain = "1234567890 ABCDEFG"; uchar enc[64]; mime.Encode(enc,plain); cout << enc << endl;
CJdlMime mime; uchar* plain = "1234567890 ABCDEFG"; uchar enc[64]; // These are both much larger than the text to encode. uchar dec[64]; mime.Encode(enc,sizeof(enc),plain,::strlen(plain)); mime.Decode(dec,sizeof(dec),enc,::strlen(enc)); cout << dec << endl;
public CJdlMime ( ) ;
Constructor.
public ~ CJdlMime ( ) ;
Destructor.
public uint Encode ( uchar * out , uint outlen , const uchar * in , uint len ) ;
Encode a sequence of characters. This routine will termine the output string with NULL. Make sure that you account for this during binary conversions.
It is safe to cast char* arguments as unsigned char* in this method.
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.