www.pudn.com > pop3.rar > mimeb64.h


//--------------------------------------------------------------------------- 
//  MIME(Quoted-Printable & Base64) Encode/Decode unit. (H) 
//  Copyright (c) 2000, 01 Mental Studio - http://msrc.126.com 
//  Author : Raptor - raptorz@163.com 
//--------------------------------------------------------------------------- 
#ifndef mimeb64H 
#define mimeb64H 
//--------------------------------------------------------------------------- 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
#define BASE64_LINE_SIZE			76 
#define QUOTE_LINE_SIZE				76 
 
//  Quoted-Printable 
              /* aDest 所指的缓冲区必须至少为 aLen 的 3 倍*/ 
int QPEncode( char * const aDest, const unsigned char * aSrc, int aLen ); 
              /* aDest 所指的缓冲区必须至少为 aSrc 长度的 1/3 */ 
int QPDecode( unsigned char * const aDest, const char * aSrc ); 
 
//  Base64 
                  /* aDest 所指的缓冲区必须至少为 aLen 的 4/3 倍 */ 
int Base64Encode( char * const aDest, const unsigned char * aSrc, int aLen ); 
                  /* aDest 所指的缓冲区必须至少为 aSrc 长度的 0.75 倍 */ 
int Base64Decode( unsigned char * const aDest, const char * aSrc ); 
 
#ifdef __cplusplus 
} 
#endif 
//--------------------------------------------------------------------------- 
#endif