diff options
Diffstat (limited to 'src/rexmpp_base64.h')
-rw-r--r-- | src/rexmpp_base64.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/rexmpp_base64.h b/src/rexmpp_base64.h index e681ed9..d11cd91 100644 --- a/src/rexmpp_base64.h +++ b/src/rexmpp_base64.h @@ -10,5 +10,26 @@ #include <stddef.h> -int rexmpp_base64_to (const char *in, size_t in_len, char **out, size_t *out_len); -int rexmpp_base64_from (const char *in, size_t in_len, char **out, size_t *out_len); +/** + @brief Encodes data in Base64 + @param[in] in Data to encode + @param[in] in_len Length of the input data + @param[out] out A pointer to the output buffer; its memory will be + allocated by the function, the caller receives ownership over it + @param[out] out_len Length of the produced Base64-encoded string + @returns 0 on success, a non-zero value otherwise +*/ +int rexmpp_base64_to (const char *in, size_t in_len, + char **out, size_t *out_len); + +/** + @brief Decodes data from Base64 + @param[in] in Data to decode + @param[in] in_len Length of the input data + @param[out] out A pointer to the output buffer; its memory will be + allocated by the function, the caller receives ownership over it + @param[out] out_len Length of the decoded string + @returns 0 on success, a non-zero value otherwise +*/ +int rexmpp_base64_from (const char *in, size_t in_len, + char **out, size_t *out_len); |