Security/ Package Name changes
[portal.git] / ecomp-portal-BE-os / src / main / java / org / onap / portalapp / portal / service / UserServiceImpl.java
@@ -2,11 +2,11 @@
  * ============LICENSE_START==========================================
  * ONAP Portal
  * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ===================================================================
  *
  * Unless otherwise specified, all software contained herein is licensed
- * under the Apache License, Version 2.0 (the “License”);
+ * under the Apache License, Version 2.0 (the "License");
  * you may not use this software except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -19,7 +19,7 @@
  * limitations under the License.
  *
  * Unless otherwise specified, all documentation contained herein is licensed
- * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+ * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
  * you may not use this documentation except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -35,7 +35,7 @@
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.openecomp.portalapp.portal.service;
+package org.onap.portalapp.portal.service;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -47,13 +47,15 @@ import java.util.List;
 
 import org.json.JSONArray;
 import org.json.JSONObject;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalsdk.core.FusionObject.Utilities;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
-import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.onap.portalapp.portal.domain.EPUser;
+import org.onap.portalapp.portal.service.UserService;
+import org.onap.portalapp.portal.service.UserServiceImpl;
+import org.onap.portalapp.portal.utils.EPSystemProperties;
+import org.onap.portalsdk.core.FusionObject.Utilities;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -241,7 +243,7 @@ public class UserServiceImpl implements UserService {
                        if (list == null || list.size() == 0) {
                                newUser.setActive(true);
                                newUser.setOrgUserId(newUser.getLoginId());
-                               newUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd()));
+                               newUser.setLoginPwd(CipherUtil.encryptPKC(newUser.getLoginPwd()));
                                getDataAccessService().saveDomainObject(newUser, null);
                        } else {
                                if (checkDuplicate.equals("Yes")) {
@@ -254,7 +256,7 @@ public class UserServiceImpl implements UserService {
                                        oldUser.setLastName(newUser.getLastName());
                                        oldUser.setMiddleInitial(newUser.getMiddleInitial());
                                        if (!oldUser.getLoginPwd().equals(newUser.getLoginPwd()))
-                                               oldUser.setLoginPwd(CipherUtil.encrypt(newUser.getLoginPwd()));
+                                               oldUser.setLoginPwd(CipherUtil.encryptPKC(newUser.getLoginPwd()));
                                        else
                                                oldUser.setLoginPwd(newUser.getLoginPwd());
                                        getDataAccessService().saveDomainObject(oldUser, null);