diff common/strhelp.h @ 188:a3bde2aaabd9

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 09:12:10 +0100
parents 1f44aae4528e
children 6b4ad6ccc48e
line wrap: on
line diff
--- a/common/strhelp.h	Wed Mar 26 09:10:46 2014 +0100
+++ b/common/strhelp.h	Wed Mar 26 09:12:10 2014 +0100
@@ -1,6 +1,10 @@
 #ifndef STRHELP_H
 #define STRHELP_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdbool.h>
 
 /**
@@ -75,4 +79,22 @@
  */
 bool str_trim (char **s);
 
+/** @brief decode base64 encoded data
+ *
+ * The memory allocated for dest needs to be free'd by the
+ * caller.
+ *
+ * @param [out] dst Pointer to the destination. Needs to be NULL
+ * @param [out] dst_size Size allocated for the destination.
+ * @param [in] src Pointer to the base64 encoded data.
+ * @param [in] src_size Size of the encoded data.
+ *
+ * @returns 0 on success a polarssl error or -1 otherwise
+ */
+int str_base64_decode(char **dst, size_t *dst_size, char *src,
+                      size_t src_size);
+#ifdef __cplusplus
+}
 #endif
+
+#endif

http://wald.intevation.org/projects/trustbridge/