Exemple #1
0
 def decode(self, code):
     return Vigenere.decode(code, self.key)
Exemple #2
0
 def encode(self, text):
     return Vigenere.encode(text, self.key)
Exemple #3
0
 def test_decode(self):
     code = Vigenere.encode(self.text, self.key)
     decoded = Vigenere.decode(code, self.key)
     self.assertEqual(decoded, self.text)
Exemple #4
0
 def decode(self, code):
     return Vigenere.decode((self.text, self.key))
Exemple #5
0
 def test_encode(self):
     code = Vigenere.encode(self.text, self.key)
     self.assertNotEqual(code, self.text)
     self.assertEqual(len(code), len(self.text))