mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
This commit is contained in:
parent
7f48396cb5
commit
634919a9fa
9 changed files with 57 additions and 20 deletions
|
@ -554,7 +554,7 @@ class IMAP4:
|
|||
import hmac
|
||||
pwd = (self.password.encode('ASCII') if isinstance(self.password, str)
|
||||
else self.password)
|
||||
return self.user + " " + hmac.HMAC(pwd, challenge).hexdigest()
|
||||
return self.user + " " + hmac.HMAC(pwd, challenge, 'md5').hexdigest()
|
||||
|
||||
|
||||
def logout(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue