如何加密或混淆客观c代码? [英] How to encrypt or obfuscate objective c code?
问题描述
我花了很多时间在这上面我无法能够找到一个完美的答案。这就是我决定在这里提出问题的原因。我有一个iPhone应用程序,并希望加密代码,以防止类转储或otool实用程序。 (用于从可执行文件中转储标头的工具)。我想知道有没有办法加密源代码或混淆源代码?
I have spent a lot of time on this and I couldn't able to find a perfect answer. That's why I decided to put my question here. I have an iPhone application and want to encrypt the code to prevent from class-dump or otool utilities. (Tools used to dump out the headers from executable). I would like to know is there any way to encrypt the source code or obfuscate the source code?
推荐答案
它复杂得多比最初看起来的那样。任何破坏方法名称的工具都有可能捏造:
It's a lot more complicated than it might seem initially. Any tool that mangles method names has the potential to fudge up:
- KVC合规性
- 使用动态生成的选择器
- Nib文件兼容性
- 协议一致性
- 方法继承
- KVC compliance
- The use of dynamically generated selectors
- Nib file compatibility
- Protocol conformance
- Method inheritance
混淆只是另一层要处理的问题;经常混淆很容易逆转。 加密并不是真的可以加密。你的类,因为Objective-C运行时和Cocoa框架将不知道如何解密它。任何坚定的人都会最终弄清楚你的计划是如何运作的。
Obfuscation is just another layer to deal with; often obfuscation is easily reversed. It is not really possible to “encrypt” your classes because the Objective-C runtime and Cocoa framework won't know how to decrypt it. Anyone determined enough will eventually figure out how your program works.
这篇关于如何加密或混淆客观c代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!