예제 #1
0
    def __init__(self, msg_dict):
        # , contact_jid, key, iv, payload, dev_id, my_dev_id):
        Node.__init__(self, 'encrypted', attrs={'xmlns': NS_OMEMO})
        header = Node('header', attrs={'sid': msg_dict['sid']})
        for rid, key in msg_dict['keys'].items():
            header.addChild('key', attrs={'rid': rid}).addData(b64encode(key))

        header.addChild('iv').addData(b64encode(msg_dict['iv']))
        self.addChild(node=header)
        self.addChild('payload').addData(b64encode(msg_dict['payload']))
예제 #2
0
파일: xmpp.py 프로젝트: klemens/gajim-omemo
    def __init__(self, msg_dict):
        # , contact_jid, key, iv, payload, dev_id, my_dev_id):
        Node.__init__(self, 'encrypted', attrs={'xmlns': NS_OMEMO})
        header = Node('header', attrs={'sid': msg_dict['sid']})
        for rid, key in msg_dict['keys'].items():
            header.addChild('key', attrs={'rid': rid}).addData(b64encode(key))

        header.addChild('iv').addData(b64encode(msg_dict['iv']))
        self.addChild(node=header)
        self.addChild('payload').addData(b64encode(msg_dict['payload']))
예제 #3
0
파일: xmpp.py 프로젝트: Ape/gajim-plugins
 def __init__(self, data):
     assert isinstance(data, Node)
     Node.__init__(self, tag='pubsub', attrs={'xmlns': NS_PUBSUB})
     self.addChild(node=data)
예제 #4
0
파일: xmpp.py 프로젝트: Ape/gajim-plugins
 def __init__(self, node_str, data):
     assert node_str is not None and isinstance(data, Node)
     Node.__init__(self, tag='publish', attrs={'node': node_str})
     self.addChild('item').addChild(node=data)
예제 #5
0
 def __init__(self, data):
     assert data is Node
     Node.__init__(self, tag='pubsub', attrs={'xmlns': NS_PUBSUB})
     self.addChild(node=data)
예제 #6
0
 def __init__(self, node_str, data):
     assert node_str is not None and data is Node
     Node.__init__(self, tag='publish', attrs={'node': node_str})
     self.addChild('item').addChild(node=data)
예제 #7
0
파일: xmpp.py 프로젝트: amenk/gajim-omemo
 def __init__(self, data):
     assert isinstance(data, Node)
     Node.__init__(self, tag='pubsub', attrs={'xmlns': NS_PUBSUB})
     self.addChild(node=data)
예제 #8
0
 def __init__(self, data):
     assert data is Node
     Node.__init__(self, tag='pubsub', attrs={'xmlns': NS_PUBSUB})
     self.addChild(node=data)