Don’t get me wrong, I don’t care if all people on the earth decompile my stuff and re-use the code. I’m not looking for protection against decompiling per say, I’m looking for a way to encrypt a string that is written in plain text in actionscript.
Will SWF encryption accomplish this? For instance if you have a variable defined somewhere
public var HolyMoly:String = "johnthebaptist@christianity.org";
And you would prefer if noone could get their hands on the direct email address to johnthebaptist, how would you solve this? Thankful for any insight.
You would store the information at a secure server-side location. What you’re trying to do is kind of akin to putting a mailto link in an HTML document and then trying to hide it. :-/
No, I think you’re misunderstanding me a bit… I need to use that string throughout the class, and putting the data server side wouldn’t really help me since I would have to call something from inside flash anyway, and decompiling would reveal that either way.
Not entirely. It would prevent most people who use a decompiler from finding out what the string is, and you could make it harder still by nesting the string within a dozen functions and then encrypting the entire SWF. But, if someone was really determined, they might still be able to decompile the original string.
You might want to look at this way of transferring encrypted data from a secure server to a SWF:
http://www.jek2k.com/wp/index.php/2007/05/22/cryptography-and-flash/
Well… it kinda leads to the same dilemma… really. Decompile, re-create with the same class and path and voila… : )