#!/usr/bin/perl

#This program will create 5 files in current directory and use them to draw the graph

use strict

my $file;
my @files;
my $key;
my $FWRITE;

$FWRITE = "RSAProbParam";



@keys = ("128", "256", "512", "768", "1024");
foreach $key (@keys) {

	@probVals = ( "1", "2", "3", "4", "5", "8", "10", "12", "15", "20",
"25", "30", "35", "40", "45", "50");

	foreach $prob ( @probVals ) {

		print "Key is $key, prob id $prob\n";

		@args  = ("java RSAprob $key $prob >>$FWRITE.$key" );
		system(@args);

	}

}

system ( "xgraph -m -t \"Primality Param. vs. Time for diff. |key|\" -x \"Primality confidence parameter\" -y \"Time (in msec)\" RSAProbParam.128 RSAProbParam.256 RSAProbParam.512 RSAProbParam.768 RSAProbParam.1024 -geometry 800x400 &" );


