mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-23 04:20:16 +08:00
style: enable HideUtilityClassConstructor
in checkstyle (#5147)
This commit is contained in:
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user