summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sparkybe-onap-service/src/main')
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/util/Encryptor.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/util/Encryptor.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/util/Encryptor.java
index bb9ceec..a239b36 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/util/Encryptor.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/util/Encryptor.java
@@ -36,6 +36,8 @@ import org.onap.aai.sparky.logging.AaiUiMsgs;
public class Encryptor {
private static final Logger LOG = LoggerFactory.getInstance().getLogger(Encryptor.class);
+ private static final String PWD_OBFUSCATION_PATTERN = "OBF:";
+
/**
* Instantiates a new encryptor.
*/
@@ -67,7 +69,7 @@ public class Encryptor {
public String decryptValue(String value) {
String decyptedValue = "";
try {
- decyptedValue = Password.deobfuscate(value);
+ decyptedValue = value.startsWith(PWD_OBFUSCATION_PATTERN)? Password.deobfuscate(value) : value;
} catch (Exception exc) {
LOG.error(AaiUiMsgs.DECRYPTION_ERROR, value, exc.toString());
}