X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Futils%2FPasswordProcessor.java;h=a6a3e2b5354aabf2a4297fefdc71d5f9f7b69ff2;hb=a884c481af24e2405f9389b01842c4671a03a75e;hp=cb6881fbf46401aaa111ad82f342d48141024cb4;hpb=06271b9df78dadfdab95dc2f6f853cdaa3148d9d;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/PasswordProcessor.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/PasswordProcessor.java index cb6881fb..a6a3e2b5 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/PasswordProcessor.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/PasswordProcessor.java @@ -6,16 +6,16 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

- * http://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software + * + *

http://www.apache.org/licenses/LICENSE-2.0 + * + *

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - *

- * SPDX-License-Identifier: Apache-2.0 + * + *

* SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -30,6 +30,7 @@ import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.PBEParameterSpec; +import org.onap.dmaap.datarouter.provisioning.ProvRunner; /** * The Processing of a Password. Password can be encrypted and decrypted. @@ -39,9 +40,11 @@ import javax.crypto.spec.PBEParameterSpec; public class PasswordProcessor { private static final String SECRET_KEY_FACTORY_TYPE = "PBEWithMD5AndDES"; - private static final String PASSWORD_ENCRYPTION_STRING = (new DB()).getProperties().getProperty("org.onap.dmaap.datarouter.provserver.passwordencryption"); + private static final String PASSWORD_ENCRYPTION_STRING = + ProvRunner.getProvProperties().getProperty("org.onap.dmaap.datarouter.provserver.passwordencryption"); private static final char[] PASSWORD = PASSWORD_ENCRYPTION_STRING.toCharArray(); - private static final byte[] SALT = {(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; + private static final byte[] SALT = {(byte) 0xde, (byte) 0x33, (byte) 0x10, + (byte) 0x12, (byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12,}; private PasswordProcessor(){ }