DEV Community

Peter + AI
Peter + AI

Posted on

πŸ”’ Protect Sensitive Data in Uniface 10.4 with Pathscrambler

This article was created with the help of artificial intelligence πŸ€–.

In Uniface 10.4, security is a big focus. One great tool is Pathscrambler β€” a command-line utility that helps you encrypt or hide sensitive data such as file paths, database logins, and application connections. This makes sure that no one can easily read your configuration files 🧩.

πŸ’‘ What Is Pathscrambler?

The tool pathscrambler.exe can encrypt information inside Uniface .asn files or text strings. It replaces readable data (like usernames or passwords) with encrypted text. You can later use these in your Uniface application to connect safely.

For example, if your assignment file looks like this:

; ASN file myapp.asn
[PATHS]
$DB  ORA:database|((username|password))
Enter fullscreen mode Exit fullscreen mode

You can run the command below:

pathscrambler -infile D:\uniface\projects\myapp.asn
Enter fullscreen mode Exit fullscreen mode

This generates an encrypted file called myapp.asn.enc where the user and password are replaced with encrypted values like this:

$DB ORA:database|(!AY9WoJPqwtjmFMtDVGVjR2cAYV+uhYMTyQuRvCkDhUpgEY=!)
Enter fullscreen mode Exit fullscreen mode

βš™οΈ Common Options

  • -infile <AsnFile> β†’ Encrypt text and connection data inside an assignment file.
  • -instr "String" β†’ Encrypt only one string directly from the command line.
  • -path "Path" β†’ Encode a single path for web or application settings.
  • -seed "Seed" β†’ Add your own seed value for stronger encryption (must be 16–64 characters).

πŸ›‘οΈ Why Use Pathscrambler?

Security is essential when developing enterprise applications. Many developers forget that simple text files can reveal credentials. Pathscrambler protects this data by encrypting it directly inside your project files.

Each encryption is unique β€” even if the same input is used again, you’ll get a completely different encrypted result. This makes copying or reusing encrypted strings impossible. πŸ”

🌱 Example with Seed

If you want to use a custom seed for consistent encryption, try this example:

pathscrambler /infile D:\uniface\projects\myapp.asn /seed "This is a really secret seed"
Enter fullscreen mode Exit fullscreen mode

This creates an encrypted assignment file and also adds a hidden seed entry in the [SETTINGS] section:

$seed = (!A0qozeo5hzTKpin0iKcRuSnlTXzG/rJCVudv87bWkKQm!)((AxqDJ5uwb0duLixvk5Vltwc=))
Enter fullscreen mode Exit fullscreen mode

⚠️ Compatibility Tip

Pathscrambler tools evolve. If you work with different Uniface versions in one environment, always use the oldest version's pathscrambler to encrypt. Newer encryptions might not be readable by older Uniface versions.

βœ… Summary

Pathscrambler is an easy but powerful security helper for Uniface applications. By encrypting paths and credentials, you reduce risks and keep your configuration files clean and safe πŸ’ͺ.

Start using it now and secure your Uniface projects in minutes! πŸ•΅οΈβ€β™‚οΈ

Top comments (0)