summaryrefslogtreecommitdiff
path: root/draft-schanzen-r5n.xml
diff options
context:
space:
mode:
Diffstat (limited to 'draft-schanzen-r5n.xml')
-rw-r--r--draft-schanzen-r5n.xml24
1 files changed, 24 insertions, 0 deletions
diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml
index b77eff3..54ee877 100644
--- a/draft-schanzen-r5n.xml
+++ b/draft-schanzen-r5n.xml
@@ -412,6 +412,30 @@ END
412 Any bloom filter uses k=16 different hash functions each of which is 412 Any bloom filter uses k=16 different hash functions each of which is
413 defined as follows: 413 defined as follows:
414 </t> 414 </t>
415 <figure>
416 <artwork name="" type="" align="left" alt=""><![CDATA[
417BF-TEST(key, bloomfilter)
418 H_key := SHA512 (key)
419 FOR i IN 0..15
420 bit := INT(H_key[i * k]) % 1024
421 IF bloomfilter[bit] IS SET
422 RETURN TRUE
423 END
424 END
425 RETURN FALSE
426END
427
428BF-SET(key, bloomfilter)
429 H_key := SHA512 (key)
430 FOR i IN 0..15
431 bit := INT(H_key[i * k]) % 1024
432 bloomfilter[bit] := 1
433 END
434END
435 ]]></artwork>
436 </figure>
437
438
415 </section> 439 </section>
416 <section anchor="p2p_opts" numbered="true" toc="default"> 440 <section anchor="p2p_opts" numbered="true" toc="default">
417 <name>Processing options</name> 441 <name>Processing options</name>