(solution) import java.util.Scanner; import javax.crypto.SecretKey; import

(solution) import java.util.Scanner; import javax.crypto.SecretKey; import

Need help with this java assignment it is 3 method returning values to 2 other method

import java.util.Scanner;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
/**
*
*/
import java.util.Scanner;
/**
* @author Sanchd
*
*/
public class Vigenere {
private static final int LETTERS_IN_ALPHABET = 26;
private static final int ASCII_RANGE = 256;
/**
* @param args
*/
public static void main(String args) {
// TODO Get the user inputs. a message of several words and punctuation.
Scanner plaintext = new Scanner(System.in);
System.out.println("Enter a multi-word message with punctuation");
String text = plaintext.nextLine();
System.out.println("Enter a single word key with not punctuations");
String key = plaintext.nextLine();
String encryptedText = encrypt(text, key);
System.out.println("String: " + text);
System.out.println("the encode message is:
System.out.println("the decoded message is:
key));
} " + encryptedText);
" + decrypt(encryptedText, static String encrypt(String text, String key) {
StringBuilder t = new StringBuilder();
String k = key;
char square = createVigSquare();
for (int i = 0, j = 0; i < text.length(); i++, j++) {
if (j >= key.length()) {
j = 0;
}
t.append(square[k.charAt(j)][text.charAt(i)]);
}
} return t.toString(); static String decrypt(String text, String key) {
StringBuilder t = new StringBuilder();
String k = key; char square = createVigSquare();
for (int i = 0; i < k.length(); i++) {
//char index = 'a';
int rowIndex = k.charAt(i);
char row = square[rowIndex];
int colIndex = new String(row).indexOf(text.charAt(i));
t.append((char) colIndex);
}
} return t.toString(); static char createVigSquare() {
char square = new char[ASCII_RANGE][ASCII_RANGE];
int start = 'a';
int end = start + (LETTERS_IN_ALPHABET – 1);
int index = start;
for (int i = start; i <= end; i++) {
for (int j = start; j <= end; j++) {
if (index > end) {
index = start;
}
square[i][j] = (char) index;
index++;
}
} index = i + 1; return square;
}
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
} static int getColIndex(char vigSquare, char ch) {
int index = 0;
// //TODO Return the column index of the
// character, ch, in the message to be encripted
return index;
}
static int getRowIndex(char vigSquare, char keyCh) {
// Return the row index of the next
// character, keyCh, in the key
}
static char getPlainTextChar(char vigSquare, int rowIndex, char ch) {
// Return the plaintext character
// corresponding to the ciphertext
// character 'ch' from the square
return ch;
}