MATLAB standalone application compiler - code obfuscation
8 次查看(过去 30 天)
显示 更早的评论
采纳的回答
dpb
2025-7-7
When MATLAB Compiler or Simulink Compiler creates an standalone executable, all the files required for that application are bundled into an archive. In the archive, each MATLAB code file (plain text MATLAB file or P-code file) is encrypted using the standard AES-256 algorithm. By default, the names of files and the directory structure are not obscured and other file types (such as MAT, FIG, MEX, and so on) are not encrypted.
Under doc mcc for the various switches is
-s
Obfuscate folder structures and file names in the deployable archive (.ctf file) from the end user.
Optionally encrypt additional file types.
The -s option directs mcc to place user code and data contained in .m, .p, v7.3 .mat, and MEX files
into a user package within the CTF. During runtime, MATLAB code and data is decrypted and loaded
directly from the user package rather than extracted to the file system. MEX files are temporarily
extracted from the user package before being loaded.
To manually include additional file types in the user package, add each file type in a separate extension
tag to the file matlabroot/toolbox/compiler/advanced_package_supported_files.xml.
The following is not supported:
ver function
Out-of-process MATLAB Runtime ( C++ shared library for MATLAB Data Array)
Out-of-process MEX file execution (mexhost, feval, matlab.mex.MexHost)
In summary, just adds an additional layer of encryption to the source and data files the packaged application contains.
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!