//----------------------------------------------------------------------------
//
//  ise_test_20.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 test20.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 Invalid Input File */
    int err = 0;
    char MyKey [] = "enterthekey";
    char MyIse [] = "non_existant_images/bad.ise";

    /* Call the constructor with key and input file name */
    jpeg_ise decrypt_test(MyKey, MyIse);
   
    /* decryption */
    err = decrypt_test.decrypt_file();
    if (err != 0)
    {
      cout << "Test 20: decrypt() correctly returned error " << err << " due to non-existant file." << endl;
    }
    else
    {
      cout << "Test 20: decrypt() failed to return error due to non-existant file." << endl;
    }

    return 0;
}
