Need help writing Decryption Method in Java?
The following is the method I use for encrypting: public static String encryptMessage(String clearmessage, int numRows) { String message = ""; int numCols = clearmessage.length() / Rows; for (int ind = 0; ind < Rows; ind++) { for (int k = 0; k < numCols; k++) { int index = indices + k * Rows; encryptedmessage += clearmessage.charAt(index); } } return message; } However, I need help creating a method that will decrypt a method that has been encrypted in the above manner, columnar transposition. The method only has to be able to decrypt messages with padding, since without padding is harder to accomplish.
TELL US , if you have any answer