Ejemplo n.º 1
0
 def test_decrypt(self):
     ciphertext = event.encrypt("some secret thing", "some password")
     self.assertEqual(event.decrypt(ciphertext, "some password"),
                      "some secret thing")
     self.assertIsNone(event.decrypt(ciphertext, "wrong password"))
Ejemplo n.º 2
0
 def test_encrypt(self):
     ciphertext = event.encrypt("some secret thing", "some password")
     self.assertNotEqual(ciphertext, "some secret thing")