Mercurial > trustbridge
comparison common/strhelp.h @ 160:bf4bfd8843bd
Add memory allocating base64 decode function
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 10:07:12 +0000 |
parents | c719d3fdbc15 |
children | 1f44aae4528e |
comparison
equal
deleted
inserted
replaced
159:37c9653b8755 | 160:bf4bfd8843bd |
---|---|
73 * first character after the last non white space character to \0. | 73 * first character after the last non white space character to \0. |
74 * @param[inout] s ponter to the string to strip | 74 * @param[inout] s ponter to the string to strip |
75 */ | 75 */ |
76 bool str_trim (char **s); | 76 bool str_trim (char **s); |
77 | 77 |
78 /** @brief decode base64 encoded data | |
79 * | |
80 * The memory allocated for dest needs to be free'd by the | |
81 * caller. | |
82 * | |
83 * @param [out] dst Pointer to the destination. Needs to be NULL | |
84 * @param [out] dst_size Size allocated for the destination. | |
85 * @param [in] src Pointer to the base64 encoded data. | |
86 * @param [in] src_size Size of the encoded data. | |
87 * | |
88 * @returns 0 on success a polarssl error or -1 otherwise | |
89 */ | |
90 int str_base64_decode(char **dst, size_t *dst_size, char *src, | |
91 size_t src_size); | |
92 | |
78 #endif | 93 #endif |