I am writing a program that decrypts a text file that has been encrypted. My buffered reader only seems to read the first line of the text file only? This is shown by my decryption function() only printing out the first line only correctly decrypted. I have attached a snippet of my code but im not sure where it is going wrong. The b variable is to exhaustively decrypt the code, its irrelevant to the file reading
BufferedReader br = new BufferedReader(new FileReader("decryptthis.txt"));
String message;
while (((message = br.readLine()) != null))
{
message = message.toUpperCase();
while (b <= 26)
{
decryption(message, b);
b++;
}
This part is in my main function
public static String decryption(String message, int b)
This is what my decryption function takes in
i think i need it to go in loop and continuously feed my decryption function the lines, however i thought this was done by the != null part
Any help would be appreciated it. Thank you