MATLAB Answers

0

How can I protect a public script from being changed?

Asked by David Koenig on 7 Aug 2018
Latest activity Edited by David Koenig on 7 Aug 2018
I write scripts that I would like other Matlab users to run but I do not want them to be able to modify it. Is there a way to protect a script that I make public?

  1 Comment

doc pcode
can probably help with this if you turn it into a function.

Sign in to comment.

2 Answers

Answer by OCDER
on 7 Aug 2018
 Accepted Answer

Perhaps convert your code to p-code to discourage modifying your codes. It is NOT a full protection for modifying your codes though.
Complete protection against modification is tricky. This would require compiling your code via something like mcc, and if you really want, adding some security checks against modification / reverse engineering (that's above my skill set). But then, its not really usable via Matlab sessions.
I think p-code is what you're aiming for.

  0 Comments

Sign in to comment.


Answer by David Koenig on 7 Aug 2018
Edited by David Koenig on 7 Aug 2018

Thanks to Adam and OCDER.

  0 Comments

Sign in to comment.