More codestring -> codebytes.

This commit is contained in:
Georg Brandl 2009-06-04 09:42:55 +00:00
parent 3ed0deb9af
commit 706824f19f
10 changed files with 16 additions and 15 deletions

View file

@ -540,7 +540,7 @@ class SMTP:
"""
def encode_cram_md5(challenge, user, password):
challenge = base64.decodestring(challenge)
challenge = base64.decodebytes(challenge)
response = user + " " + hmac.HMAC(password.encode('ascii'),
challenge).hexdigest()
return encode_base64(response.encode('ascii'), eol='')