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

@@ -35,7 +35,7 @@ public final class HillCipher {
validateDeterminant(keyMatrix, matrixSize);
int[][] messageVector = new int[matrixSize][1];
String CipherText = "";
String cipherText = "";
int[][] cipherMatrix = new int[matrixSize][1];
int j = 0;
while (j < message.length()) {
@@ -60,10 +60,10 @@ public final class HillCipher {
cipherMatrix[i][0] = cipherMatrix[i][0] % 26;
}
for (i = 0; i < matrixSize; i++) {
CipherText += (char) (cipherMatrix[i][0] + 65);
cipherText += (char) (cipherMatrix[i][0] + 65);
}
}
System.out.println("Ciphertext: " + CipherText);
System.out.println("Ciphertext: " + cipherText);
}
// Following function decrypts a message
@@ -84,7 +84,7 @@ public final class HillCipher {
// solving for the required plaintext message
int[][] messageVector = new int[n][1];
String PlainText = "";
String plainText = "";
int[][] plainMatrix = new int[n][1];
int j = 0;
while (j < message.length()) {
@@ -109,10 +109,10 @@ public final class HillCipher {
plainMatrix[i][0] = plainMatrix[i][0] % 26;
}
for (i = 0; i < n; i++) {
PlainText += (char) (plainMatrix[i][0] + 65);
plainText += (char) (plainMatrix[i][0] + 65);
}
}
System.out.println("Plaintext: " + PlainText);
System.out.println("Plaintext: " + plainText);
}
// Determinant calculator