commit e25d09faea56c6c75d75b180ccabaa53d7d6ee76
parent e3190acae77639cd7884a8978caa6d6f0d3b0b1e
Author: Nick Mathewson <nickm@torproject.org>
Date: Thu, 19 Apr 2012 22:02:54 +0000
Switch to a non-deprecated md5 implementation
svn:r397
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rank.py b/rank.py
@@ -31,17 +31,17 @@ def cache_folder():
assert isdir(r)
return r
-import md5
import re
from urllib2 import urlopen, build_opener
from urllib import quote
from datetime import date
+import hashlib
# A more handy hash
def md5h(s):
- m = md5.new()
+ m = hashlib.md5()
m.update(s)
- return m.digest().encode('hex_codec')
+ return m.hexdigest()
format_tested = 0