aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-17 17:18:53 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-17 17:18:53 +0100
commitf9b01d9c8eeac932db6357426f8a70bf525a4e07 (patch)
treef3023b6cfe959a38ed5d9ab131fc8e1c62d136ea /src/cadet/cadet.h
parent100e16ba31dac7138413bda3389d30b3575a8b8e (diff)
downloadgnunet-f9b01d9c8eeac932db6357426f8a70bf525a4e07.tar.gz
gnunet-f9b01d9c8eeac932db6357426f8a70bf525a4e07.zip
use new shortmap to simplify CADET logic a bit
Diffstat (limited to 'src/cadet/cadet.h')
-rw-r--r--src/cadet/cadet.h25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h
index 163734c06..df8803662 100644
--- a/src/cadet/cadet.h
+++ b/src/cadet/cadet.h
@@ -376,26 +376,6 @@ GC_min_pid (uint32_t a, uint32_t b);
376 376
377 377
378/** 378/**
379 * Convert a 256 bit CadetHash into a 512 HashCode to use in GNUNET_h2s,
380 * multihashmap, and other HashCode-based functions.
381 *
382 * @param id A 256 bit hash to expand.
383 *
384 * @return A HashCode containing the original 256 bit hash right-padded with 0.
385 */
386const struct GNUNET_HashCode *
387GC_h2hc (const struct GNUNET_CADET_Hash *id);
388
389
390/**
391 * Get a string from a Cadet Hash (256 bits).
392 * WARNING: Not reentrant (based on GNUNET_h2s).
393 */
394const char *
395GC_h2s (const struct GNUNET_CADET_Hash *id);
396
397
398/**
399 * Allocate a string with a hexdump of any binary data. 379 * Allocate a string with a hexdump of any binary data.
400 * 380 *
401 * @param bin Arbitrary binary data. 381 * @param bin Arbitrary binary data.
@@ -405,7 +385,10 @@ GC_h2s (const struct GNUNET_CADET_Hash *id);
405 * @return The size of the output. 385 * @return The size of the output.
406 */ 386 */
407size_t 387size_t
408GC_bin2s (void *bin, unsigned int len, char **output); 388GC_bin2s (void *bin,
389 unsigned int len,
390 char **output);
391
409 392
410/** 393/**
411 * Convert a message type into a string to help debug 394 * Convert a message type into a string to help debug