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.
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
-
Open a command prompt in the
javaapi\sampledirectory. -
Run the program:
-
Directly
java -Djava.library.path="bin_path" -jar PanopticonSample.jar bin_path license_org license_key tenant_id client_id client_secret input_file output_file
-
Using the Windows shell script
PanopticonSample.bat bin_path license_org license_key tenant_id client_id client_secret input_file output_file
-
Using the Linux shell script
PanopticonSample.sh bin_path license_org license_key tenant_id client_id client_secret input_file output_file
The arguments are as follows.
bin_pathThe path to the Panopticon bindirectory.license_orgThe organization name from your Panopticon license. license_keyThe key from your Panopticon license. tenant_idYour Microsoft Azure tenant ID. client_idThe application client ID for authentication with Azure. client_secretThe application client secret for authentication with Azure. input_fileThe path of the file to decrypt. output_fileThe path and file name to use for the decrypted file. -