Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

File decryption

java encryption decryption

Best Answer WingedPanther73, 23 April 2014 - 01:09 PM

You probably want five nested for loops that can run each position through A-Z. That seems like the easiest approach, anyway.

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 gluttz

gluttz

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 April 2014 - 08:41 AM

 I have a project for one of my classes where I need to decrypt a file by sending a class, that was given to us, a password. The password is only 5 letters, no numbers/punctuation. This is what I have so far

      
    public static String decrypter(){
        byte[] pass = new byte[5];
        
        for(int i = 65; i <= 90; i++){
            for(int e = 65; e <= 90; e++)
        }
        return pass[];
    }
            
}

I'm pretty sure I know what to do, just not how to do it.  I think I need to feed it the ASCII code for AAAAA, then AAAAB, and so on until it finds the right one. I know the ASCII codes I need to use are between 65-90 for A-Z. I just don't know how I would do this. Any help would be appreciated

 

 



#2 gluttz

gluttz

    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 23 April 2014 - 10:42 AM

I should probably be more specific on the part im stuck on. Out of the context, i need a program that will run through all possible passwords, 5 digits, letters only, non-case sensitive. It would run through all possible passwords until it finds the correct one



#3 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 23 April 2014 - 01:09 PM   Best Answer

You probably want five nested for loops that can run each position through A-Z. That seems like the easiest approach, anyway.


Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download