summaryrefslogtreecommitdiffstats
path: root/Lib/poplib.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-04-30 08:57:35 (GMT)
committerGeorg Brandl <georg@python.org>2006-04-30 08:57:35 (GMT)
commitbffb0bc064c25032264037e3c0405d7ab0d3c149 (patch)
tree402405c1b4a25a822a4174376002b348299b54fd /Lib/poplib.py
parentfa42bd7af429a909e3e964ffc8dcfa457e007ac8 (diff)
downloadcpython-bffb0bc064c25032264037e3c0405d7ab0d3c149.zip
cpython-bffb0bc064c25032264037e3c0405d7ab0d3c149.tar.gz
cpython-bffb0bc064c25032264037e3c0405d7ab0d3c149.tar.bz2
In stdlib, use hashlib instead of deprecated md5 and sha modules.
Diffstat (limited to 'Lib/poplib.py')
-rw-r--r--Lib/poplib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 202c6e0..1cf114a 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -295,8 +295,8 @@ class POP3:
m = self.timestamp.match(self.welcome)
if not m:
raise error_proto('-ERR APOP not supported by server')
- import md5
- digest = md5.new(m.group(1)+secret).digest()
+ import hashlib
+ digest = hashlib.md5(m.group(1)+secret).digest()
digest = ''.join(map(lambda x:'%02x'%ord(x), digest))
return self._shortcmd('APOP %s %s' % (user, digest))