aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-06 22:34:11 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-02-09 20:38:11 +0100
commitd06446f143610790d9a0530d524d8e9db2a03b8c (patch)
treed42cdc3c342922b56a41487d5ed49fc1c981066a /src/include
parenta80090ffcc10a2a2c188313e997d16802f2777f1 (diff)
downloadgnunet-d06446f143610790d9a0530d524d8e9db2a03b8c.tar.gz
gnunet-d06446f143610790d9a0530d524d8e9db2a03b8c.zip
add base64url encoding to util (RFC7515)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_strings_lib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 5e8892c0d..4003590fc 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -349,6 +349,19 @@ GNUNET_STRINGS_base64_encode (const void *in,
349 349
350 350
351/** 351/**
352 * Encode into Base64url. RFC7515
353 *
354 * @param in the data to encode
355 * @param len the length of the input
356 * @param output where to write the output (*output should be NULL,
357 * is allocated)
358 * @return the size of the output
359 */
360size_t
361GNUNET_STRINGS_base64url_encode (const void *in, size_t len, char **output);
362
363
364/**
352 * Decode from Base64. 365 * Decode from Base64.
353 * 366 *
354 * @param data the data to encode 367 * @param data the data to encode
@@ -364,6 +377,19 @@ GNUNET_STRINGS_base64_decode (const char *data,
364 377
365 378
366/** 379/**
380 * Decode from Base64url. RFC7515
381 *
382 * @param data the data to decode
383 * @param len the length of the input
384 * @param output where to write the output (*output should be NULL,
385 * is allocated)
386 * @return the size of the output
387 */
388size_t
389GNUNET_STRINGS_base64url_decode (const char *data, size_t len, void **out);
390
391
392/**
367 * Convert a peer path to a human-readable string. 393 * Convert a peer path to a human-readable string.
368 * 394 *
369 * @param pids array of PIDs to convert to a string 395 * @param pids array of PIDs to convert to a string