Starrier/commons

View on GitHub
src/main/java/org/starrier/common/utils/encrypt/AESUtils.java

Summary

Maintainability
A
1 hr
Test Coverage

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public static byte[] decryptAES(byte[] content, SecretKey secretKey) throws Exception {
 
IvParameterSpec iv = new IvParameterSpec(INIT_VECTOR.getBytes(StandardCharsets.UTF_8));
Cipher cipher = Cipher.getInstance(ALGORITHM_HIGH);
cipher.init(Cipher.DECRYPT_MODE, secretKey, iv);
Severity: Minor
Found in src/main/java/org/starrier/common/utils/encrypt/AESUtils.java and 1 other location - About 45 mins to fix
src/main/java/org/starrier/common/utils/encrypt/AESUtils.java on lines 96..103

Similar blocks of code found in 2 locations. Consider refactoring.
Open

public static byte[] encryptAES(byte[] content, SecretKey secretKey) throws Exception {
 
IvParameterSpec iv = new IvParameterSpec(INIT_VECTOR.getBytes(StandardCharsets.UTF_8));
Cipher cipher = Cipher.getInstance(ALGORITHM_HIGH);
cipher.init(Cipher.ENCRYPT_MODE, secretKey, iv);
Severity: Minor
Found in src/main/java/org/starrier/common/utils/encrypt/AESUtils.java and 1 other location - About 45 mins to fix
src/main/java/org/starrier/common/utils/encrypt/AESUtils.java on lines 112..119
Category
Status