If you use the output of the GUI installer to generate a response file, as described in Generating a Response File, the response file includes the encrypted form of the database password. However, it is also possible to produce an encrypted password for entry into the response file without using the GUI.
To carry out an encryption in console mode, you must:
1.
Ensure that the dependent JAR files log4j-api-2.17.2.jar, log4j-core-2.17.2.jar, tiblog.jar, crypto.jar and common_utils_library.jar are added in the classpath.
2.
Invoke the main method in class com.staffware.integration.utils.java.library.encrypt.DESEncrypterEx
You can achieve this by creating and using a wrapper script. The following example shows how to create a script in the Windows environment to invoke the method.
setlocal rem Set the following two variables to suite the system set swdir=C:\swserver\staffw_nod1 set java=%SWDIR%\java\bin\java set cp=%swdir%\eaijava\libs\bootstrap\log4j-api-2.17.2.jar set cp=%cp%;%swdir%\eaijava\libs\bootstrap\log4j-core-2.17.2.jar set cp=%cp%;%swdir%\eaijava\libs\bootstrap\tiblog.jar set cp=%cp%;%swdir%\eaijava\libs\repository\system\crypto.jar set cp=%cp%;%swdir%\eaijava\libs\repository\plugin\common_utils_library.jar %java% -cp %cp% com.staffware.integration.utils.java.library.encrypt.DESEncrypterEx %*
This is an example script for a UNIX environment:
#!/bin/ksh # Set the following two variables to suit the system swdir=/opt/swserver/staffw_nod1 java=$SWDIR/java/bin/java cp=$SWDIR/eaijava/libs/bootstrap/log4j-api-2.17.2.jar set cp=$cp:$SWDIR/eaijava/libs/bootstrap/log4j-core-2.17.2.jar set cp=$cp:$SWDIR/eaijava/libs/bootstrap/tiblog.jar cp=$cp:$SWDIR/eaijava/libs/repository/system/crypto.jar cp=$cp:$SWDIR/eaijava/libs/repository/plugin/common_utils_library.jar $java -cp $cp com.staffware.integration.utils.java.library.encrypt.DESEncrypterEx $
3.
Invoke your script by typing the name you have given it at the command prompt.
4.
Type the database password. The password is not echoed to the screen; the characters that you type are replaced by asterisks.
5.
The encrypted password is then displayed. You can copy this into your response file as the value of the SWDatabasePasswordEncrypted keyword. See Response File Example for an example of this keyword.