aboutsummaryrefslogtreecommitdiff
path: root/src/util/crypto_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/crypto_hash.c')
-rw-r--r--src/util/crypto_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index 622953476..0dbe9dbe8 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -250,12 +250,13 @@ GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode *hc,
250 */ 250 */
251int 251int
252GNUNET_CRYPTO_hash_get_bit_ltr (const struct GNUNET_HashCode *code, 252GNUNET_CRYPTO_hash_get_bit_ltr (const struct GNUNET_HashCode *code,
253 unsigned int bit) 253 unsigned int bit)
254{ 254{
255 GNUNET_assert (bit < 8 * sizeof(struct GNUNET_HashCode)); 255 GNUNET_assert (bit < 8 * sizeof(struct GNUNET_HashCode));
256 return (((unsigned char *) code)[bit >> 3] & (128 >> (bit & 7))) > 0; 256 return (((unsigned char *) code)[bit >> 3] & (128 >> (bit & 7))) > 0;
257} 257}
258 258
259
259/** 260/**
260 * Obtain a bit from a hashcode. 261 * Obtain a bit from a hashcode.
261 * @param code the GNUNET_CRYPTO_hash to index bit-wise 262 * @param code the GNUNET_CRYPTO_hash to index bit-wise
@@ -272,7 +273,6 @@ GNUNET_CRYPTO_hash_get_bit_rtl (const struct GNUNET_HashCode *code,
272} 273}
273 274
274 275
275
276/** 276/**
277 * Determine how many low order bits match in two 277 * Determine how many low order bits match in two
278 * `struct GNUNET_HashCode`s. i.e. - 010011 and 011111 share 278 * `struct GNUNET_HashCode`s. i.e. - 010011 and 011111 share