Example #1
0
 def testString(self):
     message = "This is a secret for jo jo bolonga!!!!"
     c = Crippter(self.password)
     encoded_message = c.encryptString(message)
     #print "GOT:"+encoded_message
     decoded_message = Crippter(self.password).decryptString(encoded_message)
     #print "Original String: %s\nKey: %s\nHash: %s\nDecrypted String: %s\nEqual?: %s"%(message, self.password, encoded_message, decoded_message, message==decoded_message)
     self.assertEqual(message, decoded_message)
Example #2
0
 def testFile(self):
     c = Crippter(self.password)
     c.encryptFile('pain.mp3','encrypted_pain.mp3')
     c.decryptFile('encrypted_pain.mp3','decrypted_pain.mp3')
     self.assertTrue(filecmp.cmp('decrypted_pain.mp3','pain.mp3'))