-fix
[oweals/gnunet.git] / src / include / gnunet_crypto_lib.h
index 86b862563e1fe3ba533078e981ab458dfc6791c3..777ddd97e6a811259ab30ee9d5fc40dda801e486 100644 (file)
@@ -512,6 +512,18 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen,
   GNUNET_CRYPTO_short_hash_from_string2 (enc, strlen(enc), result)
 
 
+/**
+ * Compare function for ShortHashCodes, producing a total ordering
+ * of all hashcodes.
+ *
+ * @param h1 some hash code
+ * @param h2 some hash code
+ * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
+ */
+int
+GNUNET_CRYPTO_short_hash_cmp (const struct GNUNET_CRYPTO_ShortHashCode * h1,
+                              const struct GNUNET_CRYPTO_ShortHashCode * h2);
+
 /**
  * Compute the distance between 2 hashcodes.
  * The computation must be fast, not involve