'To create the hash functions we use the SHA-1 hash of the
string and chop that up into 20 bit values and then
mod down to the length of the Bloom filter.'

def _hashes(self, item):

    m = hashlib.sha1()
    m.update(item)
    digits = m.hexdigest()
    for i in range((self.num_hashes / 8)):
        m.update(str(i))
        digits += m.hexdigest()
    hashes = [(int(digits[(i * 5):((i * 5) + 5)], 16) % self.hashbits) for i in range(self.num_hashes)]
    return hashes
