Consolidate PolicyRestAdapter setup
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / components / NotifyOtherPaps.java
index cd02c2b..34dd73c 100644 (file)
@@ -21,6 +21,7 @@
 package org.onap.policy.pap.xacml.rest.components;
 
 import com.att.research.xacml.util.XACMLProperties;
+
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.ProtocolException;
@@ -31,11 +32,12 @@ import java.util.Base64;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.UUID;
+
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
 import org.onap.policy.rest.XACMLRestProperties;
 import org.onap.policy.rest.jpa.PolicyDBDaoEntity;
-import org.onap.policy.utils.CryptoUtils;
+import org.onap.policy.utils.PeCryptoUtils;
 
 public class NotifyOtherPaps {
 
@@ -108,7 +110,7 @@ public class NotifyOtherPaps {
             String username = dbdEntity.getUsername();
             String txt;
             try {
-                txt = new String(CryptoUtils.decryptTxt(dbdEntity.getPassword()), StandardCharsets.UTF_8);
+                txt = PeCryptoUtils.decrypt(dbdEntity.getPassword());
             } catch (Exception e) {
                 LOGGER.debug(e);
                 // if we can't decrypt, might as well try it anyway