aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_strings_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-12-06 21:51:01 +0000
committerChristian Grothoff <christian@grothoff.org>2013-12-06 21:51:01 +0000
commit6332c8ffbc8f63a8006a3283b95f3e3abae1e8db (patch)
tree3544b50f45560c21ea14144b99286ae8e4c4a5c1 /src/include/gnunet_strings_lib.h
parentea70f894ce5dc62a840a507405724a55e452d033 (diff)
downloadgnunet-6332c8ffbc8f63a8006a3283b95f3e3abae1e8db.tar.gz
gnunet-6332c8ffbc8f63a8006a3283b95f3e3abae1e8db.zip
-move base64 encoder/decoder to util
Diffstat (limited to 'src/include/gnunet_strings_lib.h')
-rw-r--r--src/include/gnunet_strings_lib.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 686be93ad..f93148df5 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -317,6 +317,31 @@ GNUNET_STRINGS_string_to_data (const char *enc,
317 317
318 318
319/** 319/**
320 * Encode into Base64.
321 *
322 * @param data the data to encode
323 * @param len the length of the input
324 * @param output where to write the output (*output should be NULL,
325 * is allocated)
326 * @return the size of the output
327 */
328size_t
329GNUNET_STRINGS_base64_encode (const char *data, size_t len, char **output);
330
331/**
332 * Decode from Base64.
333 *
334 * @param data the data to encode
335 * @param len the length of the input
336 * @param output where to write the output (*output should be NULL,
337 * is allocated)
338 * @return the size of the output
339 */
340size_t
341GNUNET_STRINGS_base64_decode (const char *data, size_t len, char **output);
342
343
344/**
320 * Parse a path that might be an URI. 345 * Parse a path that might be an URI.
321 * 346 *
322 * @param path path to parse. Must be NULL-terminated. 347 * @param path path to parse. Must be NULL-terminated.
@@ -392,8 +417,8 @@ enum GNUNET_STRINGS_FilenameCheck
392 * 417 *
393 * @param filename file to check 418 * @param filename file to check
394 * @param checks checks to perform 419 * @param checks checks to perform
395 * @return GNUNET_YES if all checks pass, GNUNET_NO if at least one of them 420 * @return #GNUNET_YES if all checks pass, #GNUNET_NO if at least one of them
396 * fails, GNUNET_SYSERR when a check can't be performed 421 * fails, #GNUNET_SYSERR when a check can't be performed
397 */ 422 */
398int 423int
399GNUNET_STRINGS_check_filename (const char *filename, 424GNUNET_STRINGS_check_filename (const char *filename,