style: enable LocalVariableName in CheckStyle (#5191)

* style: enable LocalVariableName in checkstyle

* Removed minor bug

* Resolved Method Name Bug

* Changed names according to suggestions
This commit is contained in:
S. Utkarsh
2024-05-28 23:59:28 +05:30
committed by GitHub
parent 81cb09b1f8
commit 25d711c5d8
45 changed files with 418 additions and 417 deletions

View File

@@ -27,7 +27,7 @@ final class AffineCipher {
static String decryptCipher(String cipher) {
String msg = "";
int a_inv = 0;
int aInv = 0;
int flag = 0;
// Find a^-1 (the multiplicative inverse of a
@@ -38,7 +38,7 @@ final class AffineCipher {
// Check if (a*i)%26 == 1,
// then i will be the multiplicative inverse of a
if (flag == 1) {
a_inv = i;
aInv = i;
}
}
for (int i = 0; i < cipher.length(); i++) {
@@ -46,7 +46,7 @@ final class AffineCipher {
{here x is cipher[i] and m is 26} and added 'A'
to bring it in range of ASCII alphabet[ 65-90 | A-Z ] */
if (cipher.charAt(i) != ' ') {
msg = msg + (char) (((a_inv * ((cipher.charAt(i) + 'A' - b)) % 26)) + 'A');
msg = msg + (char) (((aInv * ((cipher.charAt(i) + 'A' - b)) % 26)) + 'A');
} else { // else simply append space character
msg += cipher.charAt(i);
}