File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed
src/main/java/com/thealgorithms/ciphers Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change 195195 <Match >
196196 <Bug pattern =" DRE_DECLARED_RUNTIME_EXCEPTION" />
197197 </Match >
198- <Match >
199- <Bug pattern =" SLS_SUSPICIOUS_LOOP_SEARCH" />
200- </Match >
201198 <Match >
202199 <Bug pattern =" BAS_BLOATED_ASSIGNMENT_SCOPE" />
203200 </Match >
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ static String decryptCipher(String cipher) {
6868 // then i will be the multiplicative inverse of a
6969 if (flag == 1 ) {
7070 aInv = i ;
71+ break ;
7172 }
7273 }
7374 for (int i = 0 ; i < cipher .length (); i ++) {
@@ -83,16 +84,4 @@ static String decryptCipher(String cipher) {
8384
8485 return msg .toString ();
8586 }
86-
87- // Driver code
88- public static void main (String [] args ) {
89- String msg = "AFFINE CIPHER" ;
90-
91- // Calling encryption function
92- String cipherText = encryptMessage (msg .toCharArray ());
93- System .out .println ("Encrypted Message is : " + cipherText );
94-
95- // Calling Decryption function
96- System .out .println ("Decrypted Message is: " + decryptCipher (cipherText ));
97- }
9887}
You can’t perform that action at this time.
0 commit comments