title: Java Transposition cipher encrypt/decrypt
body: <p>I'm trying to get my transposition cipher to work.</p>
  
  <p>Whenever I input the resulting cipher text of the encryption method into the decryption method, I should get back the original plain text... but that is not the case...</p>
  
  <p>what am I doing wrong?</p>
  
  <p>thanks for the help!</p>
  
  <pre><code>public String EncryptTranspositionCipher(){
      String outputstring = "";
  
  
      for(int j=0;j&lt;key;j++){
         for(int i=j;i&lt;plainText.length();i+=key){
             outputstring += plainText.charAt(i);
         }
      }
      return outputstring;
   }
   public String DecryptTranspositionCipher(){
        String outputstring = "";
        int stepforDec=0;
        stepforDec= plainText.length() / key;
        for(int j=0;j&lt;stepforDec;j++){
           for(int i=j;i&lt;plainText.length();i+=stepforDec){
               outputstring += plainText.charAt(i);
           }
        }
        return output string; }
  </code></pre>