summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0078.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
committerNathan Fritz <fritzy@netflint.net>2009-08-31 22:46:31 +0000
commit05c9ea5c1d953637343c9fad07267e7f89b20561 (patch)
treed4b0d432870bb195a4f14ec07ce889fcd080a357 /sleekxmpp/plugins/xep_0078.py
parent00d46ee2b0fe4c0d76525d284dcc7ed588e701af (diff)
downloadslixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.gz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.bz2
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.tar.xz
slixmpp-05c9ea5c1d953637343c9fad07267e7f89b20561.zip
* converted sleekxmpp to Python 3.x
* sleekxmpp no longer spawns threads for callback handlers -- there are now two threads: one for handlers and one for reading. callback handlers can get results from the read queue directly with the "wait" handler which is used in .send() for the reply catching argument.
Diffstat (limited to 'sleekxmpp/plugins/xep_0078.py')
-rw-r--r--sleekxmpp/plugins/xep_0078.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0078.py b/sleekxmpp/plugins/xep_0078.py
index 28aaeb20..24afc875 100644
--- a/sleekxmpp/plugins/xep_0078.py
+++ b/sleekxmpp/plugins/xep_0078.py
@@ -20,8 +20,8 @@
from __future__ import with_statement
from xml.etree import cElementTree as ET
import logging
-import sha
-import base
+import hashlib
+from . import base
class xep_0078(base.base_plugin):
@@ -66,7 +66,7 @@ class xep_0078(base.base_plugin):
else:
logging.debug("Authenticating via jabber:iq:auth Digest")
digest = ET.Element('digest')
- digest.text = sha.sha("%s%s" % (self.streamid, self.xmpp.password)).hexdigest()
+ digest.text = hashlib.sha1(b"%s%s" % (self.streamid, self.xmpp.password)).hexdigest()
query.append(digest)
attempt.append(query)
result = self.xmpp.send(attempt, self.xmpp.makeIq(self.xmpp.id))