Hi All, I'm new to Java. I'm doing a Computer Security course and part of the course involves encryption and decryption. I was given a program which simulates a hack tool to find 6 passwords. The programs prompts for a 4 character input. It then runs this input against an algorithm and if the word is one of the passwords then it reports a successful attempt, if not then an error.
I have to modify the program to instead of inputting words at random I want the program to search a dictionary file. The dictionary file is basically a text file containing words in the dictionary. The program should be able to take the first word in the file and run it against the decryption algorithm and return a successful or failed value. It would then move on to second word and so on..
Any ideas on what method I should use? Below is the original code:
/* This is the main program. */
public static void main (String args) throws IOException
BufferedReader in = new BufferedReader (new InputStreamReader (System.in));
String password = "";
System.out.print ("Enter your password: ");
password = in.readLine ();
// continue looping until a correct password is entered
} while (check_password (password) != true);