How to use the padding.RSAOracleWorker function in Padding

To help you get started, we’ve selected a few Padding examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexmgr / pybleach / padding.py View on Github external
def __worker_pool_init(self, pool_size, task_queue_size=100, result_queue_size=1):
    self.__task_queue = mp.Queue(task_queue_size)
    self.__result_queue = mp.Queue(result_queue_size)
    self.__worker_pool = [RSAOracleWorker(self.oracle, self.callback, self.__task_queue, self.__result_queue, self.n, self.e)
                        for _ in xrange(pool_size)]
    self.__logger.info("Created %i workers in the processing pool" % (pool_size))