共享preferences MODE_PRIVATE安全 [英] SharedPreferences MODE_PRIVATE security

查看:138
本文介绍了共享preferences MODE_PRIVATE安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的共享preferences来存储我的钥匙,我的加密的messages.If我存储他们是加密的,然后在我的应用程序解密它需要一些时间,但我感到困惑,如果将安全存储它们decrpyted在共享preferences。
任何人都可以使用特殊的应用程序或类似的东西达到我的共享preferences MODE_PRIVATE?

I am using SharedPreferences to store my keys and my crypted messages.If i store them crypted in it and then decrypt in my app it takes some time, but i am confused about if it will secure to store them decrpyted in SharedPreferences. Can anybody reach my SharedPreferences MODE_PRIVATE with special app or something like that ?

推荐答案

在一个根深蒂固的电话,是的,它可以访问共享preferences为您的应用程序。此外,任何手机上的用户可以删除所有,它的通过在应用程序管理器清除缓存存储在共享preferences的数据。
存储数据的安全的方式将与AES加密的,并把它保存在一个文本文件在您的应用程序的根文件夹。

On a rooted phone, yes, it can access the shared preferences for your app. Also, on any phone the user can delete all the data that it's stored in shared preferences by clearing the cache in the application manager. A safe way to store data would be to encrypted it with AES and save it in a text file in the root folder of your app.

这篇关于共享preferences MODE_PRIVATE安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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