style: enable HideUtilityClassConstructor in checkstyle (#5147)

This commit is contained in:
Piotr Idzik
2024-05-08 08:58:29 +02:00
committed by GitHub
parent 030bb91d05
commit d3bb691f59
285 changed files with 895 additions and 339 deletions

View File

@ -7,7 +7,9 @@ import java.util.Scanner;
* This class is build to demonstrate the application of the AES-algorithm on a
* single 128-Bit block of data.
*/
public class AES {
public final class AES {
private AES() {
}
/**
* Precalculated values for x to the power of 2 in Rijndaels galois field.

View File

@ -17,7 +17,9 @@ import javax.crypto.spec.GCMParameterSpec;
* hence in the following program we display it in hexadecimal format of the
* underlying bytes.
*/
public class AESEncryption {
public final class AESEncryption {
private AESEncryption() {
}
private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
private static Cipher aesCipher;

View File

@ -1,6 +1,8 @@
package com.thealgorithms.ciphers;
class AffineCipher {
final class AffineCipher {
private AffineCipher() {
}
// Key values of a and b
static int a = 17;

View File

@ -7,7 +7,9 @@ import java.util.Objects;
*
* @author <a href="https://github.com/freitzzz">freitzzz</a>
*/
public class ColumnarTranspositionCipher {
public final class ColumnarTranspositionCipher {
private ColumnarTranspositionCipher() {
}
private static String keyword;
private static Object[][] table;

View File

@ -11,7 +11,9 @@ import java.util.Scanner;
* for encryption. The cipher key and plaintext/ciphertext are user inputs.
* @author Ojasva Jain
*/
public class HillCipher {
public final class HillCipher {
private HillCipher() {
}
static Scanner userInput = new Scanner(System.in);

View File

@ -13,7 +13,9 @@ package com.thealgorithms.ciphers;
* @author Hikmet ÇAKIR
* @since 08-07-2022+03:00
*/
public class Polybius {
public final class Polybius {
private Polybius() {
}
private static final char[][] KEY = {
// 0 1 2 3 4

View File

@ -2,7 +2,9 @@ package com.thealgorithms.ciphers;
import java.util.Scanner;
class ProductCipher {
final class ProductCipher {
private ProductCipher() {
}
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {

View File

@ -7,7 +7,9 @@ package com.thealgorithms.ciphers.a5;
import java.util.BitSet;
public class Utils {
public final class Utils {
private Utils() {
}
public static boolean increment(BitSet bits, int size) {
int i = size - 1;