PhoneGap的移动应用程序加密

PhoneGap的移动应用程序加密

本文介绍了如何HTML + JS资产的Andr​​oid PhoneGap的移动应用程序加密?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用PhoneGap的基本包装和HTML5移动应用程序创建的。我的目标是加密的资产目录(JS和HTML文件)文件,使他们无法阅读的人,谁解压缩APK文件,并希望看到JS的来源。

I have mobile app created using Phonegap basic wrapper and HTML5. My goal is to encrypt files in assets directory (JS and HTML files) so they are unreadable to people, who unzip the APK file and want to see the JS sources.

好吧,我知道没有绝对完美的解决方案。在我去这个问题,我已经尝试过的选择如何解决我的消息来源复制保护(JS微小,模糊,等..),但我发现这是非常简单的去原来的code(使用JSBeautifier,萤火虫,包括混淆脚本,等...)。

Ok, i know there is no absolute perfect solution. On my way to this question I've already tried options how to solve copy protection of my sources (JS minification, obfuscation, etc..), but I found out that it's very simple to get to the original code (using JSBeautifier, firebug, including obfuscated scripts, etc...).

所以我的问题是 - ?有没有一些简单的方法,如何加密JS + HTML文件(所以他们无法读取和有用时只需解压APK文件),以及如何用Java实现它的Andr​​oid平台。

So my question is - is there some simple way how to encrypt JS+HTML files (so they are not readable and useful when simply unzipping APK file) and how to implement it in JAVA for Android platform ?

注意:我不认识的JAVA语言,所以请包括工作的例子,我可以使用。

Note: I have no knowledge of JAVA language, so please include working example which I can use.

编辑:我还调查了ProGuard的功能做最后的APK包时,但它是无用的,我的,因为它只涉及Java文件,但保留资产的目录,因为它是

I also investigated ProGuard feature when making final APK package, however it is useless for me, because it only deals with JAVA files, but leaves assets directory as it is.

推荐答案

前一段时间我有同样的问题,但在iOS。而结果是只配接的PhoneGap为iOS之后。我曾在http://oleksiy.pro/2011/09/20/phonegap-application-encryption/.此外,对于Android这种方法可能是微弱的,因为Java code可能是99%的反编译,以及黑客会看到你的钥匙。

Some time ago I have same problem but on iOS. And the result was only after patching PhoneGap for iOS. I have wrote an article at http://oleksiy.pro/2011/09/20/phonegap-application-encryption/. Also, for Android this method could be weak, because java code could be 99% decompiled, and hacker will see your key.

这篇关于如何HTML + JS资产的Andr​​oid PhoneGap的移动应用程序加密?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 13:40