aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-19 18:51:32 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-03-19 18:51:32 +0000
commitd2fb255905f0c93f50db2112594307bb1265742c (patch)
treee3e9c7387e66ebae147ff4e32224baea046b5ff8 /src/include/gnunet_crypto_lib.h
parentcdd5f401a24438425da10a11992c2bfd9992df47 (diff)
downloadgnunet-d2fb255905f0c93f50db2112594307bb1265742c.tar.gz
gnunet-d2fb255905f0c93f50db2112594307bb1265742c.zip
-new short hashes, new short hash cmp
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 86b862563..777ddd97e 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -513,6 +513,18 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen,
513 513
514 514
515/** 515/**
516 * Compare function for ShortHashCodes, producing a total ordering
517 * of all hashcodes.
518 *
519 * @param h1 some hash code
520 * @param h2 some hash code
521 * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
522 */
523int
524GNUNET_CRYPTO_short_hash_cmp (const struct GNUNET_CRYPTO_ShortHashCode * h1,
525 const struct GNUNET_CRYPTO_ShortHashCode * h2);
526
527/**
516 * Compute the distance between 2 hashcodes. 528 * Compute the distance between 2 hashcodes.
517 * The computation must be fast, not involve 529 * The computation must be fast, not involve
518 * a.a or a.e (they're used elsewhere), and 530 * a.a or a.e (they're used elsewhere), and