string - Writing a Java program to encrypt and decrypt a ADFGVX cipher -


i need able encrypt , decrypt message using polybius square. know how works on paper don't know start when turning program. planning use hash map told thats bad way go , there better approaches this...but don't know approaches be.

i've been given code me lecture workshop on project don't understand it. i'll paste below , if explain appreciate it! i've been focusing on c lot past while bit rusty when comes java.

char [][] poly = {     {",'a','b','d'.....     {'a','p','h','q'} } 

thats double array i'll using sort polybius square right?

for(int row = 0; row < poly.length; row++) { }  for(int col = 0; col < poly[row].length; col++) { }  // c char i'm looking if(poly[row][col] == c){ } 

this used navigating array , finding chars want?

// how break line down character string[] words = line.split(" "); for(int i=0; < words.length; i++){     string word = words[i];     for(int j = 0; j <word.length(); j++){         char letter = word.charat(j);         encrypt(letter);     } } 

this breaking line down letters obviously? do then? method encrypt in java runtime library or have make own somehow?

i'm not sure begin or best way go this, think might watch hash map tutorials , try that? first time trying encryption , whole thing looks hard , intimidating.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -