Add base64 string encode/decode functions

This commit is contained in:
vemax78
2013-07-30 22:05:32 +02:00
parent 6106db6ece
commit 9b3dc8152b
2 changed files with 79 additions and 0 deletions

View File

@ -87,4 +87,10 @@ void ac_soapclient_close_request(struct ac_http_soap_request* httprequest, int c
/* Response */
void ac_soapclient_free_response(struct ac_soap_response* response);
/* Base64 */
#define AC_BASE64_ENCODE_LENGTH(x) ((((x) + 2) / 3) * 4 + 1)
#define AC_BASE64_DECODE_LENGTH(x) (((x) / 4) * 3 + 1)
void ac_base64_string_encode(const char* decode, char* encode);
void ac_base64_string_decode(const char* encode, char* decode);
#endif /* __AC_SOAP_HEADER__ */