def test_vigenere_encipher(self): expected = "TĘO SŹŹFS LEŚV PÓĘOCOY EP SŹŹFSW Z LPDĘŃ JĘĘNÓŚAŹPWZŃ" message = "TEN SZYFR JEST PODOBNY DO SZYFRU Z KODEM JEDNORAZOWYM" key = "AĄB" m = len(key) result = Cipher.vigenere_encipher(message, key, m) 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)