Security/ Package Name changes
[portal.git] / ecomp-portal-BE-os / src / main / java / org / onap / portalapp / util / SessionCookieUtil.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
  *
  *
  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-package org.openecomp.portalapp.util;
+package org.onap.portalapp.util;
 
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
-import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
-import org.openecomp.portalsdk.core.util.SystemProperties;
-import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.onap.portalapp.portal.utils.EPCommonSystemProperties;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
+import org.onap.portalsdk.core.onboarding.util.CipherUtil;
+import org.onap.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.portalsdk.core.web.support.AppUtils;
 
 public class SessionCookieUtil {
        
@@ -78,7 +78,7 @@ public class SessionCookieUtil {
        public static void setUpUserIdCookie(HttpServletRequest request,
                        HttpServletResponse response,String userId) throws Exception {
                logger.info("************** session cookie util set up UserId cookie begins");
-               userId = CipherUtil.encrypt(userId,
+               userId = CipherUtil.encryptPKC(userId,
                                SystemProperties.getProperty(SystemProperties.Decryption_Key));
                Cookie cookie1 = new Cookie(USER_ID, userId);
                cookie1.setMaxAge(cookieMaxAge);
@@ -98,7 +98,7 @@ public class SessionCookieUtil {
                                if (cookie.getName().equals(USER_ID))
                                        userIdcookie = cookie;
                if(userIdcookie!=null){
-                       userId = CipherUtil.decrypt(userIdcookie.getValue(),
+                       userId = CipherUtil.decryptPKC(userIdcookie.getValue(),
                                        SystemProperties.getProperty(SystemProperties.Decryption_Key));
                }