Scripting Guide > Programming Methods > Encrypt and Decrypt Scripts > Encrypting Scripts in Data Tables
发布日期: 08/07/2020

Encrypting Scripts in Data Tables

You can also encrypt a script that is saved to a data table using the JSL Encrypted() or Include( Char to Blob() ) functions.

JSL Encrypted() is more straightforward, because it involves one function. You can include comments inside the encrypted script.

Include( Char to Blob() ) lets you include comments, but not inside the script.

Note: Column formulas in encrypted scripts are not encrypted. To encrypt them, include them in the JSL Encrypted() function.

Follow these steps to encrypt a data table script:

1. Place the script in a script window.

You cannot directly encrypt a script that is already saved to a data table.

2. In the script window, select Edit > Encrypt.

3. Enter a decrypt password.

4. (Optional) Enter a run password to require the user to enter a password before running the script.

5. If you entered only a decrypt password, click Yes to confirm that you do not want to assign a run password.

The encrypted script opens in a new script window.

6. Copy the entire encrypted script.

7. Create a new data table script or open an existing script.

8. In the script portion of the window, type one of the following functions:

JSL Encrypted( "" );

Include( Char to Blob( "" ) );

9. Paste the encrypted script inside the quotation marks in the function.

10. Click OK.

Example of an Encrypted Data Table Script 

需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).