//----------------------------------------------------------------------------
//
//  ise_test_4.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 test4.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[])
{
    /* Set_Key Function with Invalid Key */

    int err = 0;
    char MyKey [] = "enterthekey";

    /* Call the constructor with only the key */
    jpeg_ise decrypt_test(MyKey);

    /* Set key with NULL to get error */
    err = decrypt_test.set_key(NULL);
    if (err != 0)
    {
      cout << "Test 4: set_key(NULL) correctly returned error " << err << "." << endl;
    }
    else
    {
	cout << "Test 4: set_key(NULL) failed to return an error." << err << "." << endl;
    }
    return 0;
}
