Question #10950247

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.

2013-10-09 02:53:28

TELL US , if you have any answer

There is NEVER a problem, ONLY a challange!

The helpinganswers.com is a free-to-use knowledgebase.
  The helpinganswers.com was started on: 02.07.2010.
  It's free to register. Once you are a registered user, you can ask questions, or answer them.
  (Unless registration you can just answer the questions anonymously)
  Only english!!! Questions and answers in other languages will be deleted!!

Cheers: the PixelFighters

  Contact: support@helpinganswers.com

C'mon... follow us!

Made by, history, ect.