commit 96506342b5b59e44e2d3fb1aa1e5c8cf3956a29c
parent ae667ff39f95808fd62c99ebde9d36a5bfb3c797
Author: nolash <dev@holbrook.no>
Date: Mon, 15 Feb 2021 10:54:36 +0100
Remove spam logs
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/moolb/moolb.py b/moolb/moolb.py
@@ -17,7 +17,7 @@ class Bloom:
raise ValueError('Need byte boundary bit value')
self.rounds = rounds
if hasher == None:
- logg.info('using default hasher (SHA256)')
+ logg.debug('moolb using default hasher (SHA256)')
hasher = self.__hash
self.hasher = self.set_hasher(hasher)
@@ -49,13 +49,11 @@ class Bloom:
#s = salt.encode('utf-8')
s = i.to_bytes(4, byteorder='big')
z = self.__hash(b, s)
- logg.debug('result {}'.format(z.hex()))
r = int.from_bytes(z, byteorder='big')
m = r % self.bits
bytepos = math.floor(m / 8)
bitpos = m % 8
self.filter[bytepos] |= 1 << bitpos
- logg.debug('foo {} {}'.format(bytepos, bitpos))
return m
@@ -79,7 +77,6 @@ class Bloom:
def __hash(self, b, s):
- logg.debug('hashing {} {}'.format(b.hex(), s.hex()))
h = hashlib.sha256()
h.update(b)
h.update(s)
diff --git a/setup.py b/setup.py
@@ -6,7 +6,7 @@ f.close()
setup(
name='moolb',
- version='0.1.1b1',
+ version='0.1.1b2',
description='Simple bloom filter with pluggable hash backend',
author='Louis Holbrook',
author_email='dev@holbrook.no',