From: Philipp Tölke Date: Fri, 8 Oct 2010 09:03:37 +0000 (+0000) Subject: If I hashed the whole block I could not retrieve it without knowing it... X-Git-Tag: initial-import-from-subversion-38251~20120 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b58d0e83e888c877626533d54a41e7dc359c9de2;p=oweals%2Fgnunet.git If I hashed the whole block I could not retrieve it without knowing it... --- diff --git a/src/block/plugin_block_dns.c b/src/block/plugin_block_dns.c index 8435c1be0..6fbb9b6f2 100644 --- a/src/block/plugin_block_dns.c +++ b/src/block/plugin_block_dns.c @@ -100,7 +100,8 @@ block_plugin_dht_get_key (void *cls, { if (type != GNUNET_BLOCK_TYPE_DNS) return GNUNET_SYSERR; - GNUNET_CRYPTO_hash(block, block_size, key); + const struct GNUNET_DNS_Record* rec = block; + GNUNET_CRYPTO_hash(rec->name, rec->namelen, key); return GNUNET_OK; }