Encryption

Read(1972) Label: encryption,

This section explains cellset file encription. You can choose to skip this section if you are not a professional programmer. It won’t affect your learning about the other contents of this Tutorial.

This section explains the access privileges of esProc cellset files.

6.5.1 File encryption

esProc provides ways of encrypting cellset files to protect them from unauthorized access or use. There are two levels of encryption:

Execution privilege: With this privilege, users can set parameters, execute a cellset, and view resulting cell values and cellset descriptions, but cannot modify them. With only the execution privilege, users can neither see strings in the cells nor any cellset variables.

Full control privilege: With this privilege, users have full access to the cellset file and can take any action.

Take the following cellset as an example:

 

A

B

1

Minimum Population

500000

2

$(demo) select * from CITIES

/Get data from table CITIES.

3

$(demo) select STATEID, ABBR from STATES

/Get data from table STATES.

4

=A3.select@1(ABBR==state).STATEID

/Find the STATEID of the given state.

5

=A2.select(POPULATION>B1&& STATEID==A4)

/Find the cities.

6

return A5

 

In the above cellset, column B contains the comment-style information.

 

Click Tool>Cellset description to set the cellset description:

The cellset uses a parameter state:

Click Tool>Cellset password on the menu bar to set the password on the pop-up window:

There are two parts for password setting: Set the password for full control privilege after Input password and set the privilege without a password after non-password privilege.

To set the password, just enter it in the box, for example, setting abc as the password for the full access to the cellset in the above.

Select in the drop-down menu either “For execution” or “For full control” to set the privilege without a password:

If For full control is selected, then users are granted the highest full control privilege without a password and the password set before will be cleared, which means the cellset encryption has been removed.

Suppose you set abc as the password for the full control privilege, select For execution as the non-password privilege and then click OK and close the cellset, next time the system will open the cellset according to the non-password privilege. For example:

 

 

A

B

1

 

 

2

 

 

3

 

 

4

 

 

5

 

 

6

 

 

After the cellset is encrypted with the execution privilege, the code is invisible. Even the information in the comment cells won’t be displayed. Moreover, users with the execution privilege cannot perform encryption on the cellset. They can view the cellset descriptions by clicking Tool>Cellset description, but cannot modify them:

The values of constant cells in the cellset can be viewed in Value Viewing Section. After exection the cellset parameter value can be viewed in Cellset Variable List on the bottom right corner of the interface:

With execution privilege, users can click the icon  on the menu bar to execute the cellset. If a cellset parameter needs to be set before execution, the Input argument window will pop up for the setting.

After the parameter is set and the cellset is executed and the result is returned, the cells that have returned results will change their colors while the code in them still remains encrypted:

 

 

A

B

1

 

 

2

 

 

3

 

 

4

 

 

5

 

 

6

 

 

Click one of the cells and its value will be displayed on the right. Following is A5’s value:

Under execution privilege, click Tool>Unlock advanced privilege on the menu bar to unlock the cellset to get back the full control privilege with the password entered correctly:

Users are allowed, possessing a full control privilege, to see or modify the code in the cellset, and to encrypt or unencrypt the cellset file, etc.