libgnunet_plugin_block_fs_la_SOURCES = \
plugin_block_fs.c
libgnunet_plugin_block_fs_la_LIBADD = \
+ $(top_builddir)/src/block/libgnunetblock.la \
$(top_builddir)/src/util/libgnunetutil.la
libgnunet_plugin_block_fs_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
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.
*
*/
#define BLOOMFILTER_K 16
-/**
- * Mingle hash with the mingle_number to produce different bits.
- */
-static void
-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);
-}
-
-
/**
* Function called to validate a reply or a request. For
* request evaluation, simply pass "NULL" for the reply_block.
GNUNET_CRYPTO_hash (reply_block,
reply_block_size,
&chash);
- mingle_hash (&chash, bf_mutator, &mhash);
+ GNUNET_BLOCK_mingle_hash (&chash, bf_mutator, &mhash);
if (NULL != *bf)
{
if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf,
GNUNET_CRYPTO_hash (reply_block,
reply_block_size,
&chash);
- mingle_hash (&chash, bf_mutator, &mhash);
+ GNUNET_BLOCK_mingle_hash (&chash, bf_mutator, &mhash);
if (NULL != *bf)
{
if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf,