From 1805dae6a4c0b56dda88413ce3b80a945d06300c Mon Sep 17 00:00:00 2001 From: aaronsw Date: Thu, 28 Nov 2002 18:00:24 +0000 Subject: [PATCH] oops, forgot to test. fixed little bugs --- hash.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hash.py b/hash.py index b6e1f29..bc68686 100644 --- a/hash.py +++ b/hash.py @@ -6,7 +6,7 @@ import whrandom def intify(hstr): """20 bit hash, big-endian -> long python integer""" assert len(hstr) == 20 - return long(hstr.encode('hex'), 16)) + return long(hstr.encode('hex'), 16) def stringify(int): """long int -> 20-character string""" @@ -24,7 +24,7 @@ def distance(a, b): def newID(): - """returns a new pseudorandom globally unique ID string""" + """returns a new pseudorandom globally unique ID string""" h = sha() for i in range(20): h.update(chr(whrandom.randrange(0,256))) -- 2.39.5