将用户凭据存储在Android密钥库/密钥链中

时间:2018-03-08 07:21:53

标签: android keystore keychain key-storage

我需要在Android keystore中存储用户凭据,而不是优先考虑。我可以将它们存储在其中,但它一直存在直到应用程序开启。一旦应用程序被杀死,我无法在SecretKeyPrivateKey丢失时获取它们。有没有办法在重新启动应用程序后获取存储值或键?

我为此检查了多个样本,但没有一个帮助我解决我的问题。这是链接。 https://github.com/afollestad/android-secure-storage https://github.com/googlesamples/android-BasicAndroidKeyStore/ https://github.com/nelenkov/android-keystore

https://codeload.github.com/nelenkov/android-keystore/zip/master

1 个答案:

答案 0 :(得分:0)

AndroidKeyStore旨在存储和使用私钥材料,而不会向应用程序或操作系统公开。 这意味着您不在此处存储凭据,而是使用AndroidKeyStore提供的密钥对凭据进行加密并存储加密的结果。

相关问题