混淆/加密共享preferences文件,可能吗? [英] Obfuscate/Encrypt SharedPreferences file possible?

查看:545
本文介绍了混淆/加密共享preferences文件,可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我很感兴趣,我的模糊处理应用程序的共享preferences xml文件,就像Android的LVL不会混淆它的许可证cahce数据。这将是可能的?谷歌挖的大量已经产生,可能解决我的问题有点效果。而且我当然没有密码破译。

So, I'm interested in obfuscating the SharedPreferences xml file of my app, much like Android LVL does to obfuscate it's license cahce data. Would this be conceivable? Plenty of google-digging has yielded little results that might address my question. And I'm certainly no cryptologist.

什么其他形式的加密?我的最终目标不是要设法使XML刀枪不入,我只是想屏蔽掉低90%的人谁也来自与它乱搞克制,如果它不是纯文本格式。

What about other forms of encryption? My end goal isn't to try making the xml bulletproof, I just want to block out the lower 90% of people who would refrain from messing around with it if it's not in plain text.

推荐答案

不相信这是可能的,没有大的改动(可能是写自己的preferences实现),我甚至不能开始思考你将如何说服Android的从您的preferences实现加载。

Don't believe this is possible, not without major modifications (possibly write your own Preferences implementation), and I couldn't even begin to think about how you would persuade Android to load from your Preferences implementation.

默认共享preferences实现是不可替代的,据我可以告诉:如果你需要加密的东西做什么呢拉特,要么你加密写入共享preferences XML值,或创建你自己完全加密文件和管理它在磁盘上的自己。

The default SharedPreferences implementation isn't replaceable as far as I can tell: if you need to encrypt something do what LVL does and either encrypt the value you write to the SharedPreferences XML, or create your own entirely encrypted file and manage it on disk yourself.

这篇关于混淆/加密共享preferences文件,可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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