Encrypting the Application with CodeLock
|
CodeLock is an ASCII-to-binary conversion program that encodes command and application files, and creates a procedure file from the source file. Procedure files are usually created with an .APX extension. CodeLock creates files that can only be run-not viewed or edited.
The advantages to using files encoded by CodeLock are:
- The encoded file that R:BASE creates protects the source file from being altered because the binary files produced by CodeLock cannot be changed with a text editor.
- The run time for the encoded file might be reduced because the commands are already parsed or interpreted by CodeLock; some of the work the computer does to run the ASCII form of the command file is not necessary. Also, calls between binary blocks in procedure files can be done without opening and closing a different disk file for every call.
- A developer can create a complex application that can be distributed in one file instead of several stand-alone files.
When the "Messages" setting is off, R:BASE does not display the file that is being encoded or any system messages while the file is being encoded. When the "Messages" setting is on, the application file is displayed on screen as it is encoded.
To specify the "Messages" setting:
- Choose Utilities: Settings...
- In the "Character Settings" dialog box, click the Display button.
- In the "Display Settings" dialog box, check the "Status Messages" to display messages; uncheck the box if you don't want messages.
- Click the OK button to save this setting for only this session of R:BASE; click the Save button to save this setting for all sessions.
When you make additions or changes to a procedure file, the additions and changes are appended to the existing procedure file. If you make regular changes to a procedure file, you should first delete the procedure file to prevent it from getting too large, then run CodeLock to create a new procedure file.
Because CodeLock is only run from within R:BASE, R:BASE uses the current "Quotes" setting while encoding an application. If R:BASE encounters a SET QUOTES command while encoding an application, R:BASE will use that "Quotes" setting until it encounters another SET QUOTES command, or is finished encoding the application. When R:BASE finishes encoding the application, it resets the "Quotes" setting to the setting that was in effect before CodeLock began. For more information about the "Quotes" setting, refer to the "SET QUOTES" entry in the Online Syntax Reference.
You can open CodeLock by choosing Utilities: CodeLock..., or by clicking the CodeLock button on the tool bar.
To convert an ASCII command file to a binary command file:
- Choose Utilities: CodeLock...
- In the "CodeLock" dialog box, select "Convert an ASCII Command File to a Binary Command File."
- Click the OK button.
- In the "Name of the ASCII Command File to Convert" dialog box, select the file you want to encode.
- Click the OK button.
- In the "Name of the Backup File" dialog box, enter a name for the backup file.
- Click the OK button.
- In the "Name of the Binary Command File" dialog box, enter a name for the encoded file.
- Click the OK button.
If MESSAGES is set on, the file being encoded is displayed on screen. When the file is encoded, click the OK button.
To convert an ASCII application file to a binary procedure file:
- Choose Utilities: CodeLock...
- In the "CodeLock" dialog box, select "Convert an ASCII Application File to a Binary Procedure File."
- Click the OK button.
- In the "Name of the ASCII Application File to Convert" dialog box, select the file you want to encode.
- Click the OK button.
- In the "Name of the Procedure File" dialog box, enter a name for the encoded file. If the file does not exist, one is created.
- Click the OK button.
If MESSAGES is set on, the file being encoded is displayed on screen. When the file is encoded, click the OK button.
To add an ASCII command file to a procedure file:
- Choose Utilities: CodeLock...
- In the "CodeLock" dialog box, select "Add an ASCII Command File to a Procedure File."
- Click the OK button.
- In the "Name of the ASCII Command File to Add" dialog box, select the ASCII file you want to add to a procedure file.
- Click the OK button.
- In the "Name of the Procedure File" dialog box, enter the name of the procedure file to which the command file is to be added. If the file does not exist, one is created.
- Click the OK button.
R:BASE displays a list of the blocks in the procedure file you chose.
- Verify the name of the binary command block to be added to the procedure file.
The name of the binary command block defaults to the name of the command file you chose to add.
- Click the OK button.
- If a block with that name already exists in the procedure file, R:BASE asks if you want to overwrite the existing block. Click the OK button to overwrite the existing block, or click the Cancel button to rename the binary command block that you are adding.
- When MESSAGES is set on, the file being encoded is displayed on screen. When the file is encoded, click the OK button.
To add an ASCII screen file to a procedure file:
- Choose Utilities: CodeLock...
- In the "CodeLock" dialog box, select "Add an ASCII Screen File to a Procedure File."
- Click the OK button.
- In the "Name of the ASCII Screen File to Add" dialog box, select the file you want to add.
- Click the OK button.
- In the "Name of the Procedure File" dialog box, enter the name of the procedure file to which the screen file is to be added. If the file does not exist, one is created.
- Click the OK button.
R:BASE displays a list of the blocks in the procedure file you chose.
- Verify the name of the binary screen block to be added to the procedure file.
The name of the binary screen block defaults to the name of the screen file you chose to add.
- Click the OK button.
- If a block with that name already exists in the procedure file, R:BASE asks if you want to overwrite the existing block. Click the OK button to overwrite the existing block, or click the Cancel button to rename the binary screen block that you are adding.
- When MESSAGES is set on, the file being encoded is displayed on screen. When the file is encoded, click the OK button.
To add an ASCII menu file to a procedure file:
- Choose Utilities: CodeLock...
- In the "CodeLock" dialog box, select "Add an ASCII Menu File to a Procedure File."
- Click the OK button.
- In the "Name of the ASCII Menu File to Add" dialog box, select the file you want to add.
- Click the OK button.
- In the "Name of the Procedure File" dialog box, enter the name of the procedure file to which the menu file is to be added. If the file does not exist, one is created.
- Click the OK button.
R:BASE displays a list of the blocks in the procedure file you chose.
- Verify the name of the binary menu block to be added to the procedure file.
- Click the OK button.
- If a block with that name already exists in the procedure file, R:BASE asks if you want to overwrite the existing block. Click the OK button to overwrite the existing block, or click the Cancel button to rename the binary menu block that you are adding.
- If R:BASE detects that the menu file being added is an invalid menu file, it displays an error message and does not add the file.
- When MESSAGES is set on, the file being encoded is displayed on screen. When the file is encoded, click the OK button.