Panopticon 23.2

# Panopticon Sample Program

Panopticon includes a sample program, written in Java, which demonstrates how to use Panopticon through the Java API. The sample program determines the type of encryption used to encrypt a file and, if possible, decrypts the file.

The source code for the sample program, and a compiled `PanopticonSample.jar`, are located in `install\javaapi\sample`, where `install` is the path to your copy of the Panopticon SDK.

Before you can compile the program from the source code, you must replace the string `YOUR_KEYVIEW_LICENSE` with your license key.

NOTE: The compiled `PanopticonSample.jar` has an embedded trial license, which expires approximately five months after release. If you set the environment variable `KV_SAMPLE_PROGRAM_LICENSE_FROM_FILEPATH` to a file path, the sample program reads your license from the specified file. This allows you to use the program after the embedded trial license has expired, and to test or troubleshoot with your own license.

When you run the program using the provided shell scripts, the working directory must be the `install\javaapi\sample` folder.

To run the sample program

1. Open a command prompt in the `javaapi\sample` directory.

2. Run the program:

   - Directly

     `java -Djava.library.path="bin_path" -jar PanopticonSample.jar bin_path tenant_id client_id client_secret input_file output_file`

   - Using the Windows shell script

     `PanopticonSample.bat bin_path tenant_id client_id client_secret input_file output_file`

   - Using the Linux shell script

     `PanopticonSample.sh bin_path tenant_id client_id client_secret input_file output_file`

   The arguments are as follows.

   `bin_path` | The path to the Panopticon `bin` directory.
   `tenant_id` | Your Microsoft Azure tenant ID.
   `client_id` | The application client ID for authentication with Azure.
   `client_secret` | The application client secret for authentication with Azure.
   `input_file` | The path of the file to decrypt.
   `output_file` | The path and file name to use for the decrypted file.

Copyright 2020-2023 Open Text
Version 23.2 | Last updated March 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Panopticon 23.2

Topic Title: Panopticon Sample Program