Group Abstract Group Abstract

Message Boards Message Boards

How can I prevent other users from seeing my Input Cells?

Posted 5 months ago
POSTED BY: Yeonjoon Park
4 Replies
Posted 5 months ago
POSTED BY: Eric Rimbey
Posted 5 months ago

I would store the sensitive code in a separate file. The file should be saved using Encode and you can evaluate it in your notebook using Get without revealing the contents of the file.

Without a separate file, maybe something related could be done by putting the output of Encode into the initialization of the Manipulate. For example suppose that you have this secret 123 constant, you could:

WithCleanup[
 input = CreateFile[];
 output = CreateFile[]
 ,
 Export[input, "x=123", "Text"];
 Encode[input, output];
 Import[output, "Text"]
 ,
 DeleteFile[{input, output}]]

(* "(*!1N!*)mcm\nXw\\kJhKx !" *)

and then put that into the initialization of the manipulate:

Manipulate[ f[x], 
 Initialization -> Get[StringToStream["(*!1N!*)mcm\nXw\\kJhKx !"]]]
POSTED BY: Gustavo Delfino
Posted 5 months ago

How are you distributing your stuff? Like, are you sending the notebook itself?

POSTED BY: Eric Rimbey
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard