#ifndef BASE64_H #define BASE64_H #include #include #include #include typedef unsigned char uint8; typedef unsigned int uint32; // GB2312到UTF-8的转换 char* G2U(const char* gb2312); // UTF-8到GB2312的转换 char* U2G(const char* utf8); // Base64编码 uint32 base64_encode_gbk(char* input, uint8* encode); // Base64解码 int base64_decode_gbk(const uint8* code, uint32 code_len, char* str); uint32 base64_decode(const uint8* code, uint32 code_len, uint8* plain); uint32 base64_encode(const uint8* text, uint32 text_len, uint8* encode); void base64Encode(const unsigned char *data, unsigned long long data_len, unsigned char *result); #endif // BASE64_H