def onionRouteMessage(self, addresses, message): onion = crypto.aesPad(message) i = len(addresses)-1 while i > 0: onion = crypto.aesEncrypt(onion) onion = crypto.aesPad(FORWARD + addresses[i] + SEPARATOR) + onion i -= 1 onion = crypto.aesEncrypt(onion) self.send(addresses[0], onion)
def privateSend(self, address, message): message = crypto.aesPad(message) message = crypto.aesEncrypt(message) self.send(address, message)