Permalink
Browse files

Use the hashlib module (this change is based on the patch provided by…

… Fabian Affolter).
  • Loading branch information...
1 parent 004130c commit cc942d87fec080a51c3a57a626222295745c8b3a @jmbr committed Aug 14, 2010
Showing with 3 additions and 6 deletions.
  1. +2 −6 Halberd/clues/Clue.py
  2. +1 −0 THANKS
View
@@ -28,11 +28,7 @@
import time
import types
import rfc822
-
-try:
- from sha import new as hashfn
-except ImportError:
- from md5 import new as hashfn
+import hashlib
import Halberd.util
@@ -132,7 +128,7 @@ def _updateDigest(self):
"""Updates header fingerprint.
"""
assert self.__tmphdrs != None
- fingerprint = hashfn(self.__tmphdrs)
+ fingerprint = hashlib.sha1(self.__tmphdrs)
self.__tmphdrs = None
self.info['digest'] = fingerprint.hexdigest()
View
1 THANKS
@@ -7,5 +7,6 @@ suggesting various improvements, or submitting actual code. Here is
a list of these people. Help me keep it complete and exempt of errors.
Dethy
+Fabian Affolter
Sindre Pedersen Bjørdal
Andrés Riancho

0 comments on commit cc942d8

Please sign in to comment.