简体   繁体   English

如何使用phonegap和android混淆javascript和html文件

[英]How can I obfuscate javascript and html file using phonegap and android

I have a phonegap app and I want to launch it to Google play Market. 我有一个phonegap应用,我想将其启动到Google Play电子市场。 Before launch, I want to encrypt/obfuscate my code. 在启动之前,我想对我的代码进行加密/模糊处理。 Please suggest me the best way to do that. 请建议我这样做的最佳方法。

The best way to encrypt/obfuscate code for Phonegap is to actually have the native compiled code do the encrypting/decrypting. 加密/混淆Phonegap代码的最佳方法是实际让本机编译后的代码进行加密/解密。

You can find more information on how to do it here: http://www.oleksiy.pro/2011/09/20/phonegap-application-encryption/ 您可以在此处找到有关如何执行操作的更多信息: http : //www.oleksiy.pro/2011/09/20/phonegap-application-encryption/

Edit : This only works for iOS based compiles. 编辑 :这仅适用于基于iOS的编译。 Another similar question can be found here: How to encrypt HTML+JS assets in Android Phonegap mobile app? 在这里可以找到另一个类似的问题: 如何在Android Phonegap移动应用程序中加密HTML + JS资产?

If you just need a generic obfuscator YUI compressor works well. 如果您只需要通用混淆器,则YUI压缩器效果很好。 http://developer.yahoo.com/yui/compressor/ http://developer.yahoo.com/yui/compressor/

这可能有点遗漏,但是混淆应用程序内部工作的最佳方法之一就是将部分/全部业务逻辑迁移到服务器端Web服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM