1 #ifndef __ENCODING_HPP__ 2 #define __ENCODING_HPP__ 83 #define EncryptCArray(data) EncryptContent( CBufferToAnsiString( data, sizeof(data) ) ) 84 #define EncryptCBuffer( buf, size ) EncryptContent( CBufferToAnsiString( buf, size ) ) 85 #define DecryptCArray(data) DecryptContent( CBufferToAnsiString( data, sizeof(data) ) ) 86 #define DecryptCBuffer( buf, size ) DecryptContent( CBufferToAnsiString( buf, size ) ) 91 #endif // __ENCODING_HPP__ XString< char > AnsiString
void * getBuf() const
暴露缓冲区指针
Buffer Sha1(void const *buf, size_t size)
将数据进行sha1编码,返回二进制数据
size_t getSize() const
获取数据大小
AnsiString EncryptContent(AnsiString const &content)
内容加密
AnsiString DecryptContent(AnsiString const &encryptContent)
内容解密,与EncryptContent()配套
int RawDecrypt(byte const *encryptData, size_t dataSize, byte *buf, size_t bufSize, size_t *outSize)
未进行C++包装的内容解密,与RawEncrypt()配套
String UriComponentEncode(String const &str)
URI组成部分编码,遵循RFC1738.
缓冲区,表示内存中一块二进制数据(利用malloc/realloc进行内存分配)
int RawEncrypt(byte const *data, size_t dataSize, byte *buf, size_t bufSize, size_t *outSize)
未进行C++包装的内容加密
String HtmlEncode(String const &str)
HTML编码 作用字符:'&', '<', '>', ' '.
String Base64Encode(void const *buf, size_t size)
Base64编码
AnsiString Base64Decode(String const &base64Str)
Base64解码,与Base64Encode()配套
String Sha1Hex(void const *buf, size_t size)
将数据进行sha1编码,返回16进制数字符串
#define WINUX_FUNC_DECL(ret)
String UriComponentDecode(String const &str)
URI组成部分解码,与UriComponentEncode()配套
String UrlEncode(String const &str)
URL编码
String UrlDecode(String const &str)
URL解码,与UrlEncode()配套
String Md5Hex(void const *buf, size_t size)
将数据进行md5编码,返回16进制数字符串
String HtmlDecode(String const &str)
HTML解码,与HtmlEncode()配套