如何加密或混淆客观c代码? [英] How to encrypt or obfuscate objective c code?

查看:138
本文介绍了如何加密或混淆客观c代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

iPhone / iPad应用程序代码混淆 - 它可能吗?值得吗?

我花了很多时间在这上面我无法能够找到一个完美的答案。这就是我决定在这里提出问题的原因。我有一个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:


  1. KVC合规性

  2. 使用动态生成的选择器

  3. Nib文件兼容性

  4. 协议一致性

  5. 方法继承

  1. KVC compliance
  2. The use of dynamically generated selectors
  3. Nib file compatibility
  4. Protocol conformance
  5. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆