summaryrefslogtreecommitdiff
path: root/devel/py-gdata/files/extra-patch-src_gdata_tlslite_utils-jython_compat.py
blob: 126066c65aa37e6c27f36c00565cec3cb5513022 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- src/gdata/tlslite/utils/jython_compat.py.orig	2008-12-02 03:35:28.000000000 +0100
+++ src/gdata/tlslite/utils/jython_compat.py	2009-11-03 21:55:05.916366480 +0100
@@ -1,7 +1,7 @@
 """Miscellaneous functions to mask Python/Jython differences."""
 
 import os
-import sha
+import hashlib 
 
 if os.name != "java":
     BaseException = Exception
@@ -43,7 +43,7 @@
 
     #Factory function for getting a SHA1 object
     def getSHA1(s):
-        return sha.sha(s)
+        return hashlib.sha1(s)
 
     import sys
     import traceback
@@ -175,7 +175,7 @@
     #release, and needs to be patched
     def getSHA1(s):
         #return JCE_SHA1(s)
-        return sha.sha(s)
+        return hashlib.sha1(s)
 
 
     #Adjust the string to an array of bytes