コード例 #1
0
 def stringReceived(self, data):
     box = BoxContainer()
     box.ParseFromString(data)
     if box.name != "":
         out_klass = getattr(self._modules, box.name)
         out = out_klass()
         if box.value != "":
             out.ParseFromString(box.value)
         self.boxReceived(out, box.tx_id)
コード例 #2
0
 def stringReceived(self, addr, data):
     box = BoxContainer()
     box.ParseFromString(data)
     if box.name != "":
         out_klass = getattr(self._modules, box.name)
         out = out_klass()
         if box.value != "":
             # verify and extract signed content
             (fp, value) = token.verify_node_data(box.value, self.keyring)
             if value:
                 out.ParseFromString(value)
                 self.boxReceived(fp, box.tx_id, out)