Obfuscate Credentials
Credentials can be obfuscated using any of the following options:
Passphrase utility
The following steps illustrates how to use the passphrase encryption utility:
Execute the Passphrase.jar file:
java -jar Passphrase.jar
The user may also provide the text (to be obfuscated) in the above command as parameter as shown below:
java -jar Passphrase.jar Username Encrypted Text: 066C56CDC1A4737392D22317C61523CD
Note
When text is provided as parameter, skip step 2.
Enter the text to be obfuscated:
java -jar Passphrase.jar Please enter Text to be encrypted: Encrypted Text: 066C56CDC1A4737392D22317C61523CD
Repeat the above steps for password.
Run the sample, but make sure
Credentials_Encrypted
parameter is set to yes.The username and password should be encrypted.
java -jar Passphrase.jar Please enter Text to be Encrypted: Encrypted Text: 066C56CDC1A4737392D22317C61523CD
Set the
Credentials_Encrypted
parameter to yes in theCADP_for_JAVA.properties
file. This parameter encrypts the credentials.Run
SecretKeyEncryptionSample
to validate whether the credentials are obfuscated.java SecretKeyEncryptionSample 066C56CDC1A4737392D22317C61523CD 56BCB54B37328DD4FC05F2A76AB89D25 abcKey
Here, the first two agruments are encrypted username and password.
Obfuscation API
Use the IngrianProvider.obfuscate
API to obfuscate username and password. The following sample shows how this API obfuscates Username using the API.
String userName = "Username";
String userNameEncrypted = IngrianProvider.obfuscate(userName.getBytes());
Obfuscated Text: 066C56CDC1A4737392D22317C61523CD