Skip to content

Commit 86082ea

Browse files
committed
Changed scope of member variables
1 parent c9e13f8 commit 86082ea

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/main/java/cryptography/SecuredGCMUsage.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
package cryptography;
22

3-
import javax.crypto.Cipher;
4-
import java.security.SecureRandom;
3+
import javax.crypto.*;
54
import javax.crypto.spec.GCMParameterSpec;
6-
import javax.crypto.SecretKey;
7-
8-
import java.security.NoSuchAlgorithmException;
9-
import java.security.InvalidKeyException;
10-
import javax.crypto.IllegalBlockSizeException;
11-
import javax.crypto.NoSuchPaddingException;
125
import java.security.InvalidAlgorithmParameterException;
13-
import javax.crypto.BadPaddingException;
6+
import java.security.InvalidKeyException;
7+
import java.security.NoSuchAlgorithmException;
8+
import java.security.SecureRandom;
149

1510
/**
1611
This class securely performs AES encryption in GCM mode, with 256 bits key size.
1712
*/
1813
public class SecuredGCMUsage {
1914

20-
public static int AES_KEY_SIZE = 256;
15+
static int AES_KEY_SIZE = 256;
2116
public static int IV_SIZE = 96;
2217
public static int TAG_BIT_LENGTH = 128;
23-
public static String ALGO_TRANSFORMATION_STRING = "AES/GCM/PKCS5Padding";
18+
private static String ALGO_TRANSFORMATION_STRING = "AES/GCM/PKCS5Padding";
2419

2520
/**
2621
* Attempts to encrypt the {@code message} with a symmetric encryption technique

0 commit comments

Comments
 (0)