#include "gnunet_util_lib.h"
#include "gnunet_signatures.h"
#include "gnunet_block_lib.h"
-#include "plugin_block.h"
+#include "gnunet_block_plugin.h"
/**
struct GNUNET_BLOCK_PluginFunctions *api;
};
+
/**
* Handle to an initialized block library.
*/
};
+/**
+ * Mingle hash with the mingle_number to produce different bits.
+ *
+ * @param in original hash code
+ * @param mingle_number number for hash permutation
+ * @param hc where to store the result.
+ */
+void
+GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
+ int32_t mingle_number,
+ GNUNET_HashCode * hc)
+{
+ GNUNET_HashCode m;
+
+ GNUNET_CRYPTO_hash (&mingle_number,
+ sizeof (int32_t),
+ &m);
+ GNUNET_CRYPTO_hash_xor (&m, in, hc);
+}
+
+
/**
* Create a block context. Loads the block plugins.
*