mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-05 16:27:33 +08:00
style: include SLS_SUSPICIOUS_LOOP_SEARCH
(#6260)
This commit is contained in:
@ -68,6 +68,7 @@ final class AffineCipher {
|
||||
// then i will be the multiplicative inverse of a
|
||||
if (flag == 1) {
|
||||
aInv = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < cipher.length(); i++) {
|
||||
@ -83,16 +84,4 @@ final class AffineCipher {
|
||||
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
// Driver code
|
||||
public static void main(String[] args) {
|
||||
String msg = "AFFINE CIPHER";
|
||||
|
||||
// Calling encryption function
|
||||
String cipherText = encryptMessage(msg.toCharArray());
|
||||
System.out.println("Encrypted Message is : " + cipherText);
|
||||
|
||||
// Calling Decryption function
|
||||
System.out.println("Decrypted Message is: " + decryptCipher(cipherText));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user