Update for an Issue #1807

This commit is contained in:
Miroslav Stampar
2016-04-11 09:43:50 +02:00
parent 8004652f7b
commit 0901da3f83
2 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ class HashDB(object):
@staticmethod
def hashKey(key):
key = key.encode(UNICODE_ENCODING) if isinstance(key, unicode) else repr(key)
retVal = int(hashlib.md5(key).hexdigest()[:12], 16)
retVal = int(hashlib.md5(key).hexdigest(), 16) & 0x7fffffffffffffff # Reference: http://stackoverflow.com/a/4448400
return retVal
def retrieve(self, key, unserialize=False):