示例#1
0
文件: test.py 项目: ptaiga/examples
 def decode(self, code):
     return Vigenere.decode(code, self.key)
示例#2
0
文件: test.py 项目: ptaiga/examples
 def encode(self, text):
     return Vigenere.encode(text, self.key)
示例#3
0
 def test_decode(self):
     code = Vigenere.encode(self.text, self.key)
     decoded = Vigenere.decode(code, self.key)
     self.assertEqual(decoded, self.text)
示例#4
0
文件: test.py 项目: DrShiz/Caesar
 def decode(self, code):
     return Vigenere.decode((self.text, self.key))
示例#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))