summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0078.py
diff options
context:
space:
mode:
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))