]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - hash.py
oops, forgot to test. fixed little bugs
[quix0rs-apt-p2p.git] / hash.py
diff --git a/hash.py b/hash.py
index b6e1f294bb158c00b0d1a5adb94ada5c588e947d..bc6868668b00c48c27f4616179b703f2428ad4c0 100644 (file)
--- 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)))