Transposition Cipher Method

Java program to demonstrate Transposition Cipher Method

  1. span style="color: #006699;">java.io.*java.util.*"""""Enter a key of length 7 chars""Key Array :""[""]""Key Position Array :""[""]""Enter plain text :""Plain Text Array :""["+text[x]+"]""\n-----------------""Invalid Column Array :""["+invalidCol[i]+"]""Plain Text Array :""[""]""The encrypted text is \n"+cipherText);
  2.  
  3.  
  4. }
  5. }
Output
run:
Enter a key of length 7 chars
OLYMPIC
Key Array :
[C][I][L][M][O][P][Y]
Key Position Array :
[6][5][1][3][0][4][2]
Enter plain text :
ATTACKPOSTPONEDUNTILTWOAM
Plain Text Array :
[A][T][T][A][C][K][P][O][S][T][P][O][N][E][D][U][N][T][I][L][T][W][O][A][M]
-----------------
Invalid Column Array :
[4][5][6][-1][-1][-1][-1]
Plain Text Array :
 
[A][T][T][A][C][K][P]
[O][S][T][P][O][N][E]
[D][U][N][T][I][L][L]
[T][W][O][A][M][ ][ ]
The encrypted text is 
PELKNLTSUWAPTAAODTCOIMTTNO