def test_challenge_7(self): """ Challenge 7: Decrypt AES """ in_file = open("files/7.txt", "r") input = conv.base_64_to_bytes(in_file.read()) in_file.close() output_bytes = aestools.decrypt_ecb(input, "YELLOW SUBMARINE", True) output = output_bytes.decode("utf-8") expected_file = open('files/7_expected.txt', 'r') self.assertEqual(output, expected_file.read()) expected_file.close()
def parse_encrypted(bytes): return aestools.decrypt_ecb(bytes, KEY, True)