diff --git a/extensions/deviceicon/network.py b/extensions/deviceicon/network.py
index 47864de..158decc 100644
a
|
b
|
|
17 | 17 | |
18 | 18 | from gettext import gettext as _ |
19 | 19 | import logging |
20 | | import sha |
| 20 | import hashlib |
21 | 21 | import socket |
22 | 22 | import struct |
23 | 23 | |
… |
… |
class WirelessDeviceView(ToolButton): |
295 | 295 | if 'Frequency' in properties: |
296 | 296 | self._frequency = properties['Frequency'] |
297 | 297 | |
298 | | sh = sha.new() |
| 298 | sh = hashlib.sha1() |
299 | 299 | data = self._name + hex(self._flags) |
300 | 300 | sh.update(data) |
301 | 301 | h = hash(sh.digest()) |
diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
index f5995e6..93f07c4 100644
a
|
b
|
|
14 | 14 | # along with this program; if not, write to the Free Software |
15 | 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
16 | 16 | |
17 | | import md5 |
| 17 | import hashlib |
18 | 18 | from gettext import gettext as _ |
19 | 19 | |
20 | 20 | import gtk |
… |
… |
def hash_passphrase(passphrase): |
53 | 53 | elif len(passphrase) < 64: |
54 | 54 | while len(passphrase) < 64: |
55 | 55 | passphrase += passphrase[:64 - len(passphrase)] |
56 | | passphrase = md5.new(passphrase).digest() |
| 56 | passphrase = hashlib.md5(passphrase).digest() |
57 | 57 | return string_to_hex(passphrase)[:26] |
58 | 58 | |
59 | 59 | class CanceledKeyRequestError(dbus.DBusException): |
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index a87a1f2..6f0b94a 100644
a
|
b
|
|
16 | 16 | |
17 | 17 | from gettext import gettext as _ |
18 | 18 | import logging |
19 | | import sha |
| 19 | import hashlib |
20 | 20 | |
21 | 21 | import dbus |
22 | 22 | import hippo |
… |
… |
class AccessPointView(CanvasPulsingIcon): |
169 | 169 | if 'Mode' in properties: |
170 | 170 | self._mode = properties['Mode'] |
171 | 171 | |
172 | | sh = sha.new() |
| 172 | sh = hashlib.sha1() |
173 | 173 | data = self._name + hex(self._flags) |
174 | 174 | sh.update(data) |
175 | 175 | h = hash(sh.digest()) |
diff --git a/src/jarabe/model/owner.py b/src/jarabe/model/owner.py
index bdfd9a8..2075f08 100644
a
|
b
|
class Owner(gobject.GObject): |
62 | 62 | raise RuntimeError("invalid buddy icon") |
63 | 63 | |
64 | 64 | # Get the icon's hash |
65 | | import md5 |
66 | | digest = md5.new(self._icon).digest() |
| 65 | import hashlib |
| 66 | digest = hashlib.md5(self._icon).digest() |
67 | 67 | self._icon_hash = util.printable_hash(digest) |
68 | 68 | |
69 | 69 | self._pservice = presenceservice.get_instance() |