#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,
+ uint32_t mingle_number,
+ GNUNET_HashCode * hc)
+{
+ GNUNET_HashCode m;
+
+ GNUNET_CRYPTO_hash (&mingle_number,
+ sizeof (uint32_t),
+ &m);
+ GNUNET_CRYPTO_hash_xor (&m, in, hc);
+}
+
+
/**
* Create a block context. Loads the block plugins.
*
* @param query original query (hash)
* @param bf pointer to bloom filter associated with query; possibly updated (!)
* @param bf_mutator mutation value for bf
- * @param xquery extrended query data (can be NULL, depending on type)
+ * @param xquery extended query data (can be NULL, depending on type)
* @param xquery_size number of bytes in xquery
* @param reply_block response to validate
* @param reply_block_size number of bytes in reply block