C#-NGEN正在为.NET应用程序提供帮助,使其免受逆向工程的影响吗?如果没有,我什么时候使用它?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了C#-NGEN正在为.NET应用程序提供帮助,使其免受逆向工程的影响吗?如果没有,我什么时候使用它?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1950字,纯文字阅读大概需要3分钟。
内容图文
![C#-NGEN正在为.NET应用程序提供帮助,使其免受逆向工程的影响吗?如果没有,我什么时候使用它?](/upload/InfoBanner/zyjiaocheng/652/ad28ec88dea649be9648250e109dcaf5.jpg)
如果Ngen不能保护我的应用程序,那么我合理地期望在职业生涯中使用该应用程序吗?
解决方法:
杰弗里·里希特(Jeffrey Richter)在他的书中写了一篇很棒的文章,我不知道第三版是否出版,但这是他在2002年的wrote关于Ngen’ing的一篇很棒的文章,至今仍然有意义.
强调:
Meanwhile, there are several potential
problems with respect to NGen’d files:
No Intellectual Property Protection. Many people believe that
it might be possible to ship NGend
files without shipping the files
containing the original IL code
thereby keeping their intellectual
property a secret. Unfortunately, this
is not possible. At runtime, the CLR
requires access to the assemblys
metadata and the NGend files do not
contain the metadata.NGend Files Can Get Out-Of-Sync. When the CLR loads an
NGen’d file it compares a number of
attributes about the
previously-compile code and the
current execution environment. If any
of the attributes don’t match then the
NGen’d file cannot be used and the
normal JIT compiler process is used
instead.Poor Administration. NGen’d file are not automatically deleted when an
assembly is uninstalled adversely
affecting the .NET Frameworks easy
administration and XCOPY deployment
story.Inferior Load-Time Performance (Rebasing). When Windows loads an
NGend file, it checks to see if the
file loads at its preferred base
address. If the file cant load at its
preferred base address, then Windows
relocates the file, fixing-up all of
the memory address references. This is
extremely time consuming because
Windows must load the entire file into
memory and modify various bytes within
the file. For more information about
rebasing please see my book:
Programming Applications for Microsoft
Windows, 4th Edition (Microsoft
Press).Inferior Execution-Time Performance.
When compiling code, NGen cant make as many assumptions about the execution environment as the JIT compiler can. This causes NGen.exe to produce code with a number of memory-reference indirections that aren’t necessary for JIT compiled code
内容总结
以上是互联网集市为您收集整理的C#-NGEN正在为.NET应用程序提供帮助,使其免受逆向工程的影响吗?如果没有,我什么时候使用它?全部内容,希望文章能够帮你解决C#-NGEN正在为.NET应用程序提供帮助,使其免受逆向工程的影响吗?如果没有,我什么时候使用它?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。