def getDecryptedMessage(self): SimpleEncrypter.setDecryption(True) threads = [] for i in range(0, self.__threadcount): thread = SimpleEncrypter(i, self.__threadcount) thread.start() threads.append(thread) for t in threads: t.join() return SimpleEncrypter.getMessage()
def getEncryptedMessage(self): threads = [] SimpleEncrypter.setCryptography(self.__secretDictionary) SimpleEncrypter.setMessage(self.__message) for i in range(self.__threadcount): t = SimpleEncrypter(i, self.__threadcount) threads.append(t) t.start() for j in range(self.__threadcount): threads[j].join() encryptedM = SimpleEncrypter.getMessage() return encryptedM