I try to it. it still have junk char on it. The thing I try to do is decrypt byte key that w/o using the key. When i test is show me a junk when this code is detele any char that over the 0 to 127 but it not in english.
try
{
FileInputStream input = new FileInputStream (filename);
FileOutputStream output = new FileOutputStream (filename + ".decrypted");
int reading;
System.out.println("Please wait while the file being decrypted");
Thread.sleep(1500);
while ((reading = input.read()) != -1)
{
for(int index = 0 ; index < 256; index++)
{
byte convindex = (byte) index;
byte test = (byte) (convindex + reading);
// System.out.println (test);
isValidText (test);
if (isValidText (test))
{
output.write (index);
output.write (test);
break;
}
System.out.println ("We are done! with 1 for");
return;
}
public static boolean isValidText (byte test)
{
if (test > 0 && test < 127)
{
System.out.println (test);
return true;
}
System.out.println ("Hey this false" + test);
return false;
}