/* * category: [algorithm] * apply status: framework(xml) * edit status: not * build status: windows&linux * description: */ #ifndef __BASE64_H__ #define __BASE64_H__ #pragma once #include "config.h" #ifdef __cplusplus extern "C" { #endif static __inline int base64_encode_len(int len) { return ((len + 2) / 3 * 4) + 1; } TOOLKIT_API int base64_encode(char * coded_dst, const char *plain_src, int len_plain_src); TOOLKIT_API int base64_decode_len(const char * coded_src); TOOLKIT_API int base64_decode(char * plain_dst, const char *coded_src); #ifdef __cplusplus } // extern "C" { #endif #endif //__BASE64_H__