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:

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:

  1. Choose Utilities: Settings...
  2. In the "Character Settings" dialog box, click the Display button.
  3. In the "Display Settings" dialog box, check the "Status Messages" to display messages; uncheck the box if you don't want messages.
  4. 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:

  1. Choose Utilities: CodeLock...
  2. In the "CodeLock" dialog box, select "Convert an ASCII Command File to a Binary Command File."
  3. Click the OK button.
  4. In the "Name of the ASCII Command File to Convert" dialog box, select the file you want to encode.
  5. Click the OK button.
  6. In the "Name of the Backup File" dialog box, enter a name for the backup file.
  7. Click the OK button.
  8. In the "Name of the Binary Command File" dialog box, enter a name for the encoded file.
  9. 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:

  1. Choose Utilities: CodeLock...
  2. In the "CodeLock" dialog box, select "Convert an ASCII Application File to a Binary Procedure File."
  3. Click the OK button.
  4. In the "Name of the ASCII Application File to Convert" dialog box, select the file you want to encode.
  5. Click the OK button.
  6. 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.
  7. 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:

  1. Choose Utilities: CodeLock...
  2. In the "CodeLock" dialog box, select "Add an ASCII Command File to a Procedure File."
  3. Click the OK button.
  4. In the "Name of the ASCII Command File to Add" dialog box, select the ASCII file you want to add to a procedure file.
  5. Click the OK button.
  6. 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.
  7. Click the OK button.

    R:BASE displays a list of the blocks in the procedure file you chose.

  8. 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.

  9. Click the OK button.

To add an ASCII screen file to a procedure file:

  1. Choose Utilities: CodeLock...
  2. In the "CodeLock" dialog box, select "Add an ASCII Screen File to a Procedure File."
  3. Click the OK button.
  4. In the "Name of the ASCII Screen File to Add" dialog box, select the file you want to add.
  5. Click the OK button.
  6. 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.
  7. Click the OK button.

    R:BASE displays a list of the blocks in the procedure file you chose.

  8. 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.

  9. Click the OK button.

To add an ASCII menu file to a procedure file:

  1. Choose Utilities: CodeLock...
  2. In the "CodeLock" dialog box, select "Add an ASCII Menu File to a Procedure File."
  3. Click the OK button.
  4. In the "Name of the ASCII Menu File to Add" dialog box, select the file you want to add.
  5. Click the OK button.
  6. 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.
  7. Click the OK button.

    R:BASE displays a list of the blocks in the procedure file you chose.

  8. Verify the name of the binary menu block to be added to the procedure file.
  9. Click the OK button.