def test_column_encipher(self): expected = "RROAFGAPYEB ZWZMSOCY NIZMMLSEU WRLTRTOSEEKEIM JPAU " message = "PIERWSZYM PARAMETREM SZYFRU KOLUMNOWEGO JEST LICZBA" key = "JIHGFĘEDĆCBĄA" result = Cipher.column_encipher(message, key) self.assertEquals(expected, result)
def test_column_encipher2(self): expected = "SIEIRDDNRMHMUGAAMTMES" message = "AMIDSUMMERNIGHTSDREAM" key = "SWINDON" result = Cipher.column_encipher(message, key) self.assertEquals(expected, result)
def zad_2(): message = "LICZBA WYSOCE ZŁOŻONA" result1 = Cipher.railFence_encipher(message, 3) print("1") print(result1) result2 = Cipher.matrix_cipher(message, 3) print("2") print(result2) result3 = Cipher.column_encipher(message, "NWD") print("3") print(result3) result4 = Cipher.vigenere_encipher(message, "NWW", len("NWW")) print("4") print(result4) result5 = Cipher.cesar(message) print("5") print(result5)