How to use the padding.Bleichenbacher.__POISON_PILL 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 __get_task_results(self):
    res = []
    while True:
      result = self.__result_queue.get()
      res.append(result)
      self.__logger.debug("Result for task: ")
      self.__logger.debug("\tFound in iteration %i of task: %i" % (result[3], result[0]))
      self.__logger.debug("\tS value: %i" % result[2])
      if result == Bleichenbacher.__POISON_PILL:
        break
      self.__s = result[2] 
      self.__i = result[3]
      self.s_search_running = False
github alexmgr / pybleach / padding.py View on Github external
def __result_thread_stop(self):
    self.__result_queue.put(Bleichenbacher.__POISON_PILL)
    self.__result_worker.join(2)
    self.__logger.info("Stopped result polling thread")