对于离线应用存储密码 [英] Storing password for an offline app
本文介绍了对于离线应用存储密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发一个应用程序,用户可以在偏远地区使用。我创建了一个启动对话框,要求输入密码。我保存在密码共享preferences
。
I'm developing an app where the user can use it in remote locations. I've created a startup dialog asking for password. I saved the password in SharedPreferences
.
我的问题是,它是一个好主意,这样做呢?或有用于存储密码的脱机应用更好的办法?
My question is, is it a good idea to do that? Or is there a better way for storing passwords for offline apps?
由于当我试图清除我的应用程序的数据在设置 - >应用程序,在共享preferences我保存的密码
也被删除。
Because when I try to clear the data of my app in settings -> apps, my saved password in SharedPreferences
is also being deleted.
推荐答案
您可以哈希密码并将其存储在一个文件
you can hash your password and store it in a file
搜索哈希函数如 MD5
或..
search for hash function like MD5
or ..
这篇关于对于离线应用存储密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文