summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0047/stanza.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0047/stanza.py')
-rw-r--r--sleekxmpp/plugins/xep_0047/stanza.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0047/stanza.py b/sleekxmpp/plugins/xep_0047/stanza.py
index fb0d4309..afba07a8 100644
--- a/sleekxmpp/plugins/xep_0047/stanza.py
+++ b/sleekxmpp/plugins/xep_0047/stanza.py
@@ -2,7 +2,7 @@ import re
import base64
from sleekxmpp.exceptions import XMPPError
-from sleekxmpp.xmlstream import register_stanza_plugin, ET, ElementBase
+from sleekxmpp.xmlstream import ElementBase
from sleekxmpp.thirdparty.suelta.util import bytes
@@ -12,6 +12,7 @@ VALID_B64 = re.compile(r'[A-Za-z0-9\+\/]*=*')
def to_b64(data):
return bytes(base64.b64encode(bytes(data))).decode('utf-8')
+
def from_b64(data):
return bytes(base64.b64decode(bytes(data))).decode('utf-8')