Move XEP-0047 to new system.

This commit is contained in:
Lance Stout
2012-03-11 21:15:01 -07:00
parent be363e0b46
commit 1f5a3a4445
4 changed files with 22 additions and 14 deletions

View File

@@ -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')