user2366657
user2366657

Reputation: 23

Protecting Source Code in Matlab vs. Python

I need to write a program in either Python or MATLAB that contains some proprietary information, but will not easily reveal this proprietary information if the program is distributed.

While I realize that a determined hacker can reverse engineer any source code, would it be easier to secure code written in Python or MATLAB?

Upvotes: 2

Views: 2134

Answers (2)

Sam Roberts
Sam Roberts

Reputation: 24127

In MATLAB you can use the command pcode, which preparses your MATLAB code to a form that is unreadable by humans, but runs exactly the same (actually, very slightly faster) as the original MATLAB code. What happens is that for each .m file you pcode, you'll get a new file with a .p extension. The .p file runs the same as the .m file, but is unreadable.

Alternatively, you can purchase MATLAB Compiler, which will convert your entire application into a standalone executable where the code is encrypted.

Upvotes: 4

user1319936
user1319936

Reputation:

It seems to be pretty easy to do in MATLAB:

pcode <filename>

See the Documentation Center.

For python see the Python wiki.

Upvotes: 1

Related Questions