Fixed a unicode error in xep_0065 on Python 3

This commit is contained in:
Keith Gray 2014-06-15 18:40:58 -05:00
parent e5582694c0
commit 577fd71472

View file

@ -240,9 +240,9 @@ class XEP_0065(base_plugin):
# The hostname MUST be SHA1(SID + Requester JID + Target JID)
# where the output is hexadecimal-encoded (not binary).
digest = sha1()
digest.update(sid)
digest.update(str(requester))
digest.update(str(target))
digest.update(sid.encode('utf-8'))
digest.update(str(requester).encode('utf-8'))
digest.update(str(target).encode('utf-8'))
dest = digest.hexdigest()