-remove trailing whitespace
[oweals/gnunet.git] / src / include / gnunet_strings_lib.h
index 8bb8cfb067feaa2a09700a5b14d0a1301ea8ea1d..eb16a339d7fa53a754e34456d504b7f9a0d233bd 100644 (file)
@@ -153,27 +153,27 @@ GNUNET_STRINGS_from_utf8 (const char *input,
 
 
 /**
- * Convert the utf-8 input string to lowercase
- * Output needs to be allocated appropriately
+ * Convert the utf-8 input string to lower case.
+ * Output needs to be allocated appropriately.
  *
  * @param input input string
  * @param output output buffer
  */
 void
-GNUNET_STRINGS_utf8_tolower (const charinput,
-                            char** output);
+GNUNET_STRINGS_utf8_tolower (const char *input,
+                            char *output);
 
 
 /**
- * Convert the utf-8 input string to lowercase
- * Output needs to be allocated appropriately
+ * Convert the utf-8 input string to upper case.
+ * Output needs to be allocated appropriately.
  *
  * @param input input string
  * @param output output buffer
  */
 void
-GNUNET_STRINGS_utf8_toupper (const charinput,
-                            char** output);
+GNUNET_STRINGS_utf8_toupper (const char *input,
+                            char *output);
 
 
 /**
@@ -316,6 +316,32 @@ GNUNET_STRINGS_string_to_data (const char *enc,
                               size_t out_size);
 
 
+/**
+ * Encode into Base64.
+ *
+ * @param data the data to encode
+ * @param len the length of the input
+ * @param output where to write the output (*output should be NULL,
+ *   is allocated)
+ * @return the size of the output
+ */
+size_t
+GNUNET_STRINGS_base64_encode (const char *data, size_t len, char **output);
+
+
+/**
+ * Decode from Base64.
+ *
+ * @param data the data to encode
+ * @param len the length of the input
+ * @param output where to write the output (*output should be NULL,
+ *   is allocated)
+ * @return the size of the output
+ */
+size_t
+GNUNET_STRINGS_base64_decode (const char *data, size_t len, char **output);
+
+
 /**
  * Parse a path that might be an URI.
  *
@@ -392,8 +418,8 @@ enum GNUNET_STRINGS_FilenameCheck
  *
  * @param filename file to check
  * @param checks checks to perform
- * @return GNUNET_YES if all checks pass, GNUNET_NO if at least one of them
- *         fails, GNUNET_SYSERR when a check can't be performed
+ * @return #GNUNET_YES if all checks pass, #GNUNET_NO if at least one of them
+ *         fails, #GNUNET_SYSERR when a check can't be performed
  */
 int
 GNUNET_STRINGS_check_filename (const char *filename,