MATLAB standalone application compiler - code obfuscation

8 次查看(过去 30 天)
Does anyone know what does this option does? how does it compare between obfuscated/not obfuscated code?

采纳的回答

dpb
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 个)

类别

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

产品


版本

R2025a

Community Treasure Hunt

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

Start Hunting!

Translated by