Consultor Eletrônico



Kbase P147079: How to encrypt a source code using Xcode
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/05/2009
Status: Unverified

GOAL:

How to encrypt a source code using Xcode

GOAL:

How to use XCODE

GOAL:

How to encrypt a procedure

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

Use the XCODE utility to encrypt Progress procedures and include files.

This is the syntax for XCODE:

SYNTAX
xcode [ -k key ] -d directory [ files] [ - ]


key
A character string up to 8 characters long. On UNIX, key is case sensitive. If you do not specify key, XCODE uses a default key. When Progress is started with the Encrypted Compiler Mode (-rx) startup parameter, the Progress Application Compiler automatically uses this default key, unless you specify the XCODE option on the COMPILE statement.

directory
The directory where XCODE places the encrypted files. The specified directory must be different from the source directory, because each encrypted file retains the name of its original source file. XCODE overwrites existing files in directory if they are encrypted.

files
The relative pathnames of the files you want to encrypt. XCODE appends the pathnames supplied to directory.

Before running XCODE, create a directory structure exactly parallel to your source directory structure, then move to the root of the original source directory structure. Supply the root of the new structure as directory, and supply the relative path names of the files to be encrypted as files. The relative path names are appended to directory. Because XCODE does not create new directories, any directories implied by the directory or files arguments must be created before running XCODE. Encrypted files have the same names as the original source files.

You must encrypt both your procedure and include files in order for your encrypted procedures to run.

The dash (-) option tells XCODE to take filenames from the standard input. On UNIX, this allows you pipe output from an ls, cat, or find command to XCODE.

Here is an example of how you can use XCODE on UNIX. Suppose you have just finished developing and testing the procedures in /usr/test and its four subdirectories and want to encrypt them for shipment to users. Follow these steps:

Create a directory structure parallel to /usr/test:

cd /usr/test
mkdir /usr/testx
mkdir /usr/testx/ar
mkdir /usr/testx/fm
mkdir /usr/testx/inv
mkdir /usr/testx/oeFk


Move to the original development root in preparation for encryption:

cd /usr/test


Encrypt your procedures:

xcode -k mykey -d usr/testx *.p ar/*.p fm/*.p inv/*.p oe/*.p


Encrypted versions of the source procedures in /usr/test and its subdirectories now reside, with the same names, in /usr/testx and its subdirectories.

NOTE: You must also encrypt include (.i) files.