//----------------------------------------------------------------------------
//
//  ise_test_22.cpp
//
//  Authors: Joe Jarchow, Geoffrey Griffith, Joseph Kadhim, Shinya Daigaku
//           Andrew Pouzeshi
//
//  Sponsor: Tom Lookabaugh, Assistant Professor of Computer Science
//           University of Colorado
//
//  Senior Project: Team ISE (Image Selective Encryption)
//----------------------------------------------------------------------------


// This file is designed to test the ISE production code with test22.sh

#include <stdlib.h>     
#include <iostream>
#include <fstream> 
#include <string>
#include "rijndael-api-fst.h"
#include "ise.h"

using namespace std;

int main(int argc, char * argv[])
{
    /* Decrypt_File Function with Incorrect Key */
    size_t length = 0;
    char MyDifferentKey [] = "different_from_MyKey;alskjfsafl;ajl";
    char * MyIse;
    if (argc > 0)
    {
        length = strlen(argv[1]);
        MyIse = new char [length + 1];
        strcpy (MyIse,argv[1]);
    }
    else
    {
        length = strlen("images/ralphie.ise");
        MyIse = new char [length + 1];
        strcpy (MyIse,"images/ralphie.ise");
    }

    /* Call the constructor with key and input file name */
    jpeg_ise decrypt_test(MyDifferentKey, MyIse);

    /* decryption */
    decrypt_test.decrypt_file();

    return 0;
}
