aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmso-optimizer/pom.xml4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java6
-rw-r--r--cmso-service/pom.xml4
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java6
-rw-r--r--cmso-ticketmgt/pom.xml8
-rw-r--r--cmso-ticketmgt/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java6
-rw-r--r--cmso-topology/pom.xml8
-rw-r--r--cmso-topology/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java6
8 files changed, 12 insertions, 36 deletions
diff --git a/cmso-optimizer/pom.xml b/cmso-optimizer/pom.xml
index f6d2227..4281cf7 100644
--- a/cmso-optimizer/pom.xml
+++ b/cmso-optimizer/pom.xml
@@ -136,10 +136,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java
index 4b68176..12da757 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java
@@ -28,10 +28,10 @@ package org.onap.optf.cmso.optimizer.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -104,7 +104,7 @@ public class PropertiesManagement {
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
byte[] encrypted = cipher.doFinal(value.getBytes());
- return Base64.encodeBase64String(encrypted);
+ return Base64.getEncoder().encodeToString(encrypted);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
debug.debug("Unexpected exception", ex);
@@ -119,7 +119,7 @@ public class PropertiesManagement {
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
- byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
+ byte[] original = cipher.doFinal(Base64.getDecoder().decode(encrypted));
return new String(original);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
diff --git a/cmso-service/pom.xml b/cmso-service/pom.xml
index acc6db7..05c7962 100644
--- a/cmso-service/pom.xml
+++ b/cmso-service/pom.xml
@@ -147,10 +147,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java b/cmso-service/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
index de917e4..b16c52a 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
@@ -33,10 +33,10 @@ package org.onap.optf.cmso.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -105,7 +105,7 @@ public class PropertiesManagement {
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
byte[] encrypted = cipher.doFinal(value.getBytes());
- return Base64.encodeBase64String(encrypted);
+ return Base64.getEncoder().encodeToString(encrypted);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
debug.debug("Unexpected exception", ex);
@@ -120,7 +120,7 @@ public class PropertiesManagement {
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
- byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
+ byte[] original = cipher.doFinal(Base64.getDecoder().decode(encrypted));
return new String(original);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
diff --git a/cmso-ticketmgt/pom.xml b/cmso-ticketmgt/pom.xml
index 7d6ee0e..4910ec4 100644
--- a/cmso-ticketmgt/pom.xml
+++ b/cmso-ticketmgt/pom.xml
@@ -111,10 +111,6 @@
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId>
@@ -136,10 +132,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
diff --git a/cmso-ticketmgt/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java b/cmso-ticketmgt/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
index bcd9ca1..8d739ee 100644
--- a/cmso-ticketmgt/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
+++ b/cmso-ticketmgt/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
@@ -33,10 +33,10 @@ package org.onap.optf.cmso.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -106,7 +106,7 @@ public class PropertiesManagement {
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
byte[] encrypted = cipher.doFinal(value.getBytes());
- return Base64.encodeBase64String(encrypted);
+ return Base64.getEncoder().encodeToString(encrypted);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
debug.debug("Unexpected exception", ex);
@@ -121,7 +121,7 @@ public class PropertiesManagement {
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
- byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
+ byte[] original = cipher.doFinal(Base64.getDecoder().decode(encrypted));
return new String(original);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
diff --git a/cmso-topology/pom.xml b/cmso-topology/pom.xml
index 4809a93..19ea398 100644
--- a/cmso-topology/pom.xml
+++ b/cmso-topology/pom.xml
@@ -111,10 +111,6 @@
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId>
@@ -136,10 +132,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </dependency>
- <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java b/cmso-topology/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
index 1993b82..fadad45 100644
--- a/cmso-topology/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
+++ b/cmso-topology/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
@@ -28,10 +28,10 @@ package org.onap.optf.cmso.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -98,7 +98,7 @@ public class PropertiesManagement {
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
byte[] encrypted = cipher.doFinal(value.getBytes());
- return Base64.encodeBase64String(encrypted);
+ return Base64.getEncoder().encodeToString(encrypted);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());
debug.debug("Unexpected exception", ex);
@@ -113,7 +113,7 @@ public class PropertiesManagement {
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
Cipher cipher = Cipher.getInstance(transformation);
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
- byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
+ byte[] original = cipher.doFinal(Base64.getDecoder().decode(encrypted));
return new String(original);
} catch (Exception ex) {
errors.error("Unexpected exception {0}", ex.getMessage());