#!/bin/bash

ifile="test"  # name of the input file containing the plain text
rfile="res"   # name of the output file where time data go

>$ifile
echo anusha > $ifile

for KSZ in 128 256 512 768 1024
do
	(java RSAmod $KSZ < $ifile)>>$rfile
	echo -e "\n" >>$rfile
done

#generating data for diff keysizes

#exit 0


#tmp* files contain mssg of sizes 0, 538, 1062, 2087, 4065 Bytes resp. appending the ouput in the rfile
# this takes a lot of time to run...


for ifile in "tmp" "tmp1"  "tmp2" "tmp3" "tmp4"
do
	for KSZ in 128 512
	do 
		(java RSAmod $KSZ <$ifile)>>$rfile
		echo -e "\n" >>$rfile
	done
done

#for the third part i have directly made the changes in the code using a variable c.  hence, cannot run as a script.
