File tree 1 file changed +1
-12
lines changed
src/main/java/com/thealgorithms/ciphers
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 6
6
/**
7
7
* Columnar Transposition Cipher Encryption and Decryption.
8
8
*/
9
- public class ColumnarTranspositionCipher {
9
+ public final class ColumnarTranspositionCipher {
10
10
11
11
private static final char PADDING_CHAR = '≈' ;
12
12
@@ -120,15 +120,4 @@ private static Integer[] getColumnOrder(String key) {
120
120
Arrays .sort (order , Comparator .comparingInt (o -> keyChars [o ]));
121
121
return order ;
122
122
}
123
-
124
- public static void main (String [] args ) {
125
- String keywordForExample = "asd215" ;
126
- String wordBeingEncrypted = "This is a test of the Columnar Transposition Cipher" ;
127
- System .out .println ("### Example of Columnar Transposition Cipher ###\n " );
128
- System .out .println ("Word being encryped ->>> " + wordBeingEncrypted );
129
- String encryptedMessage = ColumnarTranspositionCipher .encrypt (wordBeingEncrypted , keywordForExample );
130
- System .out .println ("Word encrypted ->>> " + encryptedMessage );
131
- System .out .println ("Word decryped ->>> " + ColumnarTranspositionCipher .decrypt (encryptedMessage , keywordForExample ));
132
-
133
- }
134
123
}
You can’t perform that action at this time.
0 commit comments