feat: truncate hash to 32bit to deal with automatic truncation of python

dunder hash method.
This commit is contained in:
Fabian Joswig 2022-07-05 10:53:31 +01:00
parent ded21e792f
commit 572309c800

View file

@ -692,7 +692,7 @@ class Obs:
hash_tuple += tuple([o.encode() for o in self.names]) hash_tuple += tuple([o.encode() for o in self.names])
m = hashlib.md5() m = hashlib.md5()
[m.update(o) for o in hash_tuple] [m.update(o) for o in hash_tuple]
return int(m.hexdigest(), 16) return int(m.hexdigest(), 16) & 0xFFFFFFFF
# Overload comparisons # Overload comparisons
def __lt__(self, other): def __lt__(self, other):