diff options
Diffstat (limited to 'src/block/plugin_block_fs.c')
-rw-r--r-- | src/block/plugin_block_fs.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/block/plugin_block_fs.c b/src/block/plugin_block_fs.c index 0626e458c..a5219b706 100644 --- a/src/block/plugin_block_fs.c +++ b/src/block/plugin_block_fs.c | |||
@@ -38,23 +38,6 @@ | |||
38 | #define BLOOMFILTER_K 16 | 38 | #define BLOOMFILTER_K 16 |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Mingle hash with the mingle_number to produce different bits. | ||
42 | */ | ||
43 | static void | ||
44 | mingle_hash (const GNUNET_HashCode * in, | ||
45 | int32_t mingle_number, | ||
46 | GNUNET_HashCode * hc) | ||
47 | { | ||
48 | GNUNET_HashCode m; | ||
49 | |||
50 | GNUNET_CRYPTO_hash (&mingle_number, | ||
51 | sizeof (int32_t), | ||
52 | &m); | ||
53 | GNUNET_CRYPTO_hash_xor (&m, in, hc); | ||
54 | } | ||
55 | |||
56 | |||
57 | /** | ||
58 | * Function called to validate a reply or a request. For | 41 | * Function called to validate a reply or a request. For |
59 | * request evaluation, simply pass "NULL" for the reply_block. | 42 | * request evaluation, simply pass "NULL" for the reply_block. |
60 | * Note that it is assumed that the reply has already been | 43 | * Note that it is assumed that the reply has already been |
@@ -113,7 +96,7 @@ block_plugin_fs_evaluate (void *cls, | |||
113 | GNUNET_CRYPTO_hash (reply_block, | 96 | GNUNET_CRYPTO_hash (reply_block, |
114 | reply_block_size, | 97 | reply_block_size, |
115 | &chash); | 98 | &chash); |
116 | mingle_hash (&chash, bf_mutator, &mhash); | 99 | GNUNET_BLOCK_mingle_hash (&chash, bf_mutator, &mhash); |
117 | if (NULL != *bf) | 100 | if (NULL != *bf) |
118 | { | 101 | { |
119 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, | 102 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, |
@@ -154,7 +137,7 @@ block_plugin_fs_evaluate (void *cls, | |||
154 | GNUNET_CRYPTO_hash (reply_block, | 137 | GNUNET_CRYPTO_hash (reply_block, |
155 | reply_block_size, | 138 | reply_block_size, |
156 | &chash); | 139 | &chash); |
157 | mingle_hash (&chash, bf_mutator, &mhash); | 140 | GNUNET_BLOCK_mingle_hash (&chash, bf_mutator, &mhash); |
158 | if (NULL != *bf) | 141 | if (NULL != *bf) |
159 | { | 142 | { |
160 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, | 143 | if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test (*bf, |