Using hash functions with Bloom filters
Posted
by dangerstat
on Stack Overflow
See other posts from Stack Overflow
or by dangerstat
Published on 2010-05-02T12:41:37Z
Indexed on
2010/05/02
12:47 UTC
Read the original article
Hit count: 340
Hi,
A bloom filter uses a hash function (or many) to generate a value between 0 and m given an input string X. My question is how to you use a hash function to generate a value in this way, for example an MD5 hash is typically represented by a 32 length hex
string, how would I use an MD5 hashing algorithm to generate a value between 0 and m where I can specify m? I'm using Java at the moment so an example of to do this with the MessageDigest functionality it offers would be great, though just a generic description of how to do about it would be fine too.
Thanks
© Stack Overflow or respective owner