?? base641.h
字號:
/*==========================================================================
ASCII---->base64 source code
powered by shadow
@2004.10.4 01:01
web:http://www.codehome.6600.org
info:
sperated by 6 bits:
-----Base64 code table:
-----0-25--> 'A"-'Z' 26-51-->'a'-'z' 52-61-->'0'-'9' 62-->'+' 63-->'/'
============================================================================*/
#if !defined(AFX_BASE641_H__11427255_4FE0_4D28_9AF5_70A5F8701068__INCLUDED_)
#define AFX_BASE641_H__11427255_4FE0_4D28_9AF5_70A5F8701068__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MaxLen 741
#define DeMaxLen 1014
class BASE64
{
public:
int FileDecode(char * fromfile,char * tofile);
char * StringDecode(unsigned char *p);
void Reset();
char * GetLastError();
int FileEncode(char *fromfile,char *tofile);
char * StringEncode(unsigned char *p);
BASE64();
virtual ~BASE64();
private:
void decode_2();
void decode_4();
void decode_3();
void file_decode(FILE *fp);
//
void file_encode(FILE *fp);
void encode_3();
void encode_2();
void encode_1();
void put(unsigned char ch);
FILE * fp_in;
FILE * fp_out;
bool StrEncode;
bool StrDecode;
unsigned char code[3];
unsigned char decode[5];
int length;
char *base64_str;
char Base64Str[1015];
int errorcode;
char *Base64Error[3];
};
#endif // !defined(AFX_BASE641_H__11427255_4FE0_4D28_9AF5_70A5F8701068__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -