summaryrefslogtreecommitdiff
blob: fd8e9e5ab8f0bd4ffcb1d98c895f3946ba41765e (plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
diff -Naur pyicqt-0.8.1.5/src/avatar.py p1//src/avatar.py
--- pyicqt-0.8.1.5/src/avatar.py	2010-06-07 12:16:36.000000000 +0200
+++ p1//src/avatar.py	2010-06-07 12:16:16.000000000 +0200
@@ -6,7 +6,7 @@
 from twisted.words.xish.domish import Element
 from debug import LogEvent, INFO, WARN, ERROR
 import lang
-import sha
+from hashlib import sha1
 import base64
 import os
 import os.path
@@ -46,7 +46,7 @@
 class Avatar:
 	""" Represents an Avatar. Does not store the image in memory. """
 	def __init__(self, imageData, avatarCache):
-		self.__imageHash = sha.sha(imageData).hexdigest()
+		self.__imageHash = sha1(imageData).hexdigest()
 		self.__avatarCache = avatarCache
 
 	def getImageHash(self):
diff -Naur pyicqt-0.8.1.5/src/contact.py p1//src/contact.py
--- pyicqt-0.8.1.5/src/contact.py	2010-06-07 12:16:43.000000000 +0200
+++ p1//src/contact.py	2010-06-07 12:16:16.000000000 +0200
@@ -8,7 +8,6 @@
 import config
 from debug import LogEvent, INFO, WARN, ERROR
 import lang
-import sha
 import legacy
 import globals
 import base64
diff -Naur pyicqt-0.8.1.5/src/legacy/buddies.py p1//src/legacy/buddies.py
--- pyicqt-0.8.1.5/src/legacy/buddies.py	2009-08-24 14:37:59.000000000 +0200
+++ p1//src/legacy/buddies.py	2010-06-07 12:07:37.000000000 +0200
@@ -12,7 +12,7 @@
 import os.path
 import binascii
 import os.path
-import md5
+from hashlib import md5
 
 X = os.path.sep
 
@@ -188,7 +188,7 @@
 				avatarData = avatar.AvatarCache().setAvatar(imgmanip.convertToPNG(iconData))
 				c.updateAvatar(avatarData, push=True)
 				if not md5Hash:
-					m = md5.new()
+					m = md5()
 					m.update(iconData)
 					md5Hash = m.digest()
 				if not numHash:
diff -Naur pyicqt-0.8.1.5/src/legacy/glue.py p1//src/legacy/glue.py
--- pyicqt-0.8.1.5/src/legacy/glue.py	2009-08-24 14:37:59.000000000 +0200
+++ p1//src/legacy/glue.py	2010-06-07 12:07:37.000000000 +0200
@@ -18,7 +18,7 @@
 import time
 import binascii
 import avatar
-import md5
+from hashlib import md5
 import random
 
 from twisted.python import log
@@ -398,7 +398,7 @@
 			try:
 				self.myavatar = imgmanip.convertToJPG(imageData)
 				self.myavatarlen = len(self.myavatar)
-				m=md5.new()
+				m=md5()
 				m.update(self.myavatar)
 				self.myavatarsum = m.digest()
 				self.myavatarstamp = time.time()
diff -Naur pyicqt-0.8.1.5/src/legacy/icqt.py p1//src/legacy/icqt.py
--- pyicqt-0.8.1.5/src/legacy/icqt.py	2009-08-24 14:37:59.000000000 +0200
+++ p1//src/legacy/icqt.py	2010-06-07 12:07:37.000000000 +0200
@@ -14,7 +14,6 @@
 import time
 import datetime
 import binascii
-import md5
 import locale
 import struct
 
diff -Naur pyicqt-0.8.1.5/src/tlib/oscar.py p1//src/tlib/oscar.py
--- pyicqt-0.8.1.5/src/tlib/oscar.py	2009-08-24 14:37:59.000000000 +0200
+++ p1//src/tlib/oscar.py	2010-06-07 12:07:37.000000000 +0200
@@ -21,7 +21,7 @@
 from scheduler import Scheduler
 
 import struct
-import md5
+from hashlib import md5
 import string
 import socket
 import random
@@ -120,9 +120,9 @@
     return dict,data
 
 def encryptPasswordMD5(password,key):
-    m=md5.new()
+    m=md5()
     m.update(key)
-    m.update(md5.new(password).digest())
+    m.update(md5(password).digest())
     m.update("AOL Instant Messenger (SM)")
     return m.digest()
 
@@ -534,7 +534,7 @@
         self.iconSum = tlvs.get(0xd5,"")
 
     def updateIcon(self, iconData):
-        m=md5.new()
+        m=md5()
         m.update(iconData)
         self.iconSum = m.digest()
         log.msg("icon sum is %s" % binascii.hexlify(self.iconSum))