Encryption of CTRL scripts/libraries

The following encryption options are provided for encryption of scripts:

Anmerkung: Note that you have to have write permission in order to encrypt a panel/script.

No matter which encryption method you use, you have to decide whether you need a license keyword or not in order to execute an encrypted script. Define this by adding a keyword to a script:

// $License: newFeature

"NOLICENSE" (available by default) specifies that no license is needed in order to use the generated .ctc.

"newFeature" specifies that the license keyword "newFeature" has to exist in a license container (see also Licensing).

If a new license keyword is being used when the panel/script is encrypted and this keyword does not exist in a license container yet, either the existing license has to be changed (extended) or you have to get a new license (if the panel/script is being used on a new computer).

The following information is required for the license request:

1. When the license container is extended: send the new keyword to ETM.

2. New license: send the desired license options as well as your new license keywords to ETM.

Encryption via the WCCOAtoolCryptCtrl tool

The WCCOAtoolCryptCtrl tool is located in the directory <wincc_oa_path>/bin and is called as follows from the Shell of the operating system being used:

 WCCOAtoolCryptCtrl <absolutePath>\<inputFileName>
                    [<absolutePath>\<outputFileName>][-passPhrase
                <password>]]

In order to protect a script by using a password, the option -passPhrase <password> is being used. Enter a password.

The encrypted script is created with the .ctc extension in the same directory. The unencrypted .ctl file is not deleted.

Changes made in a .ctl file can be updated to the .ctc file by re-executing the command (by using the same output file name).

The option -help or -h shows information about the encryption tool:

 WCCOAtoolCryptCtrl -help

Example

Open the Shell and change to the \bin directory of the version. Execute the following command:

WCCOAtoolCryptCtrl <proj_path>\scripts\libs\Scripts.ctl -passPhrase myPassword

The file Scripts.ctl is encrypted and saved in the directory <proj_path>/scripts/libs with the name Scripts.ctc . The encrypted file has the same name as the input file since an output file was not specified.

Encryption via the Project View

The Project View of the GEDI allows encrypting scripts of the running project.

  1. A license keyword is not required in order to encrypt scripts or libraries. Add a license keyword to a script or if you do not use a keyword, add the option
    //$License: NOLICENSE
    to the script, see the beginning of this chapter.
  2. To encrypt a script, right-click the script that should be encrypted and click on the Encrypt Script option.

Figure: Encrypt Script option

  1. The window "Define Password" is opened. Enable the check box "Password Protection for Gedi" and enter a password. Check the check box "Keep password for this Session". Then click onOK. Since you checked the check box, the window is not shown when editing the script within the current session and the script is opened without showing a note.

The encrypted script is saved with the .ctc extension in the same directory and with the same name. The unencrypted .ctl file is not deleted.

Changes that have been made in the .ctl file can be updated to the .ctc by encrypting the same script again.

Change of the password

If you want to use another password for an already encrypted file, save the file under another name and encrypt it by using a new password.