Encrypt the password

When specifying the database login password in the PowerServer project painter > Database page, or in the PowerServer C# solution > ServerAPIs project > AppConfig > Applications.json file, or when specifying the proxy server password in the PowerServer C# solution > ServerAPIs project > Server.json file > "ProxyOptions", you can encrypt the password, and then input the encrypted value instead of the plain text.

To encrypt a password, you can execute the CustomizeDeploy.dll file located in the PowerBuilder IDE installation folder (%AppeonInstallPath%\PowerBuilder [version]\Pstools\CustomizeDeploy) or on the Web server.

If you execute the CustomizeDeploy.dll file located in the PowerBuilder IDE installation folder, there is no need to install the ASP.NET Core Runtime as it is already installed with PowerServer Toolkit, as explained in the following steps.

If you execute the CustomizeDeploy.dll file located on the Web server, you will need to install the ASP.NET Core Runtime first.

To encrypt a password:

  1. Open the command prompt. (You'd better run the command prompt using an administrator by right-clicking it and then selecting "Run as administrator").

  2. Navigate to the PowerBuilder IDE installation folder (%AppeonInstallPath%\PowerBuilder [version]\Pstools\CustomizeDeploy).

  3. Execute the CustomizeDeploy.dll file using the dotnet command.

    dotnet CustomizeDeploy.dll -encrypt=<string>
    dotnet CustomizeDeploy.dll -encrypt=<string> -outfile=<output file>

    The "encrypt" argument should be set to the value that needs to be encrypted.

    The "outfile" argument can save the encrypted value in the specified location and file.



    Note

    If special characters are contained in the value, use double quotation marks (in Windows) or single quotation marks (in Linux) to include the entire value. For example,

    In Windows, to encrypt the value post!gres

    dotnet CustomizeDeploy.dll -encrypt="post!gres"

    If the quotation mark is contained as part of value, then place the escape character \ before the quotation mark. For example, to encrypt the value postgr”es

    dotnet CustomizeDeploy.dll -encrypt="postgr\”es"