How can I protect files other than .m file with Matlab compiler?

7 次查看(过去 30 天)
After I compiled the matlab files and other non-matlab files successfully, I found that when users run the executable files, the extraction of the executable will expand all files into temporary folders. All Matlab files are encrypted but all other files are just original files without any protection (not encrypted). Do you have any idea to protect the non-matlab files as well? Thanks.
  1 个评论
Walter Roberson
Walter Roberson 2018-2-4
Mathworks does not provide any facility for this.
In some cases, you could use your own encryption function. However some routines such as imread() only read from unencrypted files, so you might have to do a notable amount of work to replace those functions, such as finding a combination of Java stream functions that can process them.

请先登录,再进行评论。

回答(1 个)

Jan
Jan 2018-2-5
If you want to deliver encrypted files, encrypt them before the compilation. Then you Matlab code must contain the required decryption methods.
Remember that the keys for the decryption must be included in your compiled code. Then the keys can be found more or less easily also. If the files should be read by standard methods like imread, load etc., this will not work directly. Decrypting the files at first will leave clear text data on the disk.
  6 个评论
Zheng Yan
Zheng Yan 2018-2-5
Hi Walter, this is very useful information. Thanks for your detailed explanations.
Walter Roberson
Walter Roberson 2018-2-5
In my experience, the easiest way to ensure that no-one will defeat your encryption system, is to make your program bug-ridden and useless: if the "value" available to be extracted from your program is pretty much zero, then it is not worth anyone's time to analyze it.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by