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.jarThe 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: 066C56CDC1A4737392D22317C61523CDNote
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: 066C56CDC1A4737392D22317C61523CDRepeat the above steps for password.
Run the sample, but make sure
Credentials_Encryptedparameter is set to yes.The username and password should be encrypted.
java -jar Passphrase.jar Please enter Text to be Encrypted: Encrypted Text: 066C56CDC1A4737392D22317C61523CDSet the
Credentials_Encryptedparameter to yes in theCADP_for_JAVA.propertiesfile. This parameter encrypts the credentials.Run
SecretKeyEncryptionSampleto validate whether the credentials are obfuscated.java SecretKeyEncryptionSample 066C56CDC1A4737392D22317C61523CD 56BCB54B37328DD4FC05F2A76AB89D25 abcKeyHere, 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