+ }
+
+ /**
+ *
+ * It retrieves account information from input String
+ *
+ * @param authValue
+ * @return Array of Account information
+ *
+ */
+ public static String[] getUserNamePassword(String authValue) {
+ String base64Credentials = authValue.substring("Basic".length()).trim();
+ String credentials = new String(Base64.getDecoder().decode(base64Credentials), Charset.forName("UTF-8"));
+ final String[] values = credentials.split(":", 2);
+ return values;
+ }
+
+ /**
+ * It encodes the function code based on Hex encoding
+ *
+ * @param funCode
+ *
+ */
+ public static String encodeFunctionCode(String funCode) {
+ String encodedString = funCode;
+ Pattern encodePattern = Pattern.compile(EcompPortalUtils.slash);
+ return encodedString = encodePattern.matcher(encodedString)
+ .replaceAll("%" + Hex.encodeHexString(encodePattern.toString().getBytes()))
+ .replaceAll("\\*", "%" + Hex.encodeHexString("*".getBytes()));
+ }
+
+ public static boolean checkFunctionCodeHasEncodePattern(String code) {
+ return code.contains(EcompPortalUtils.slash);
+ }
+