在我的应用程序中,用户使用网络服务登录,网络服务返回授权 key 。在那之后,用户发出的每个请求都使用此 key 完成。
我的问题是如何安全地存储这个 key ?我一直将其存储在 SharedPreferences 中,但这对我来说听起来不太安全。
最佳答案
您是对的,使用共享首选项并不是可遵循的方法。你应该利用 Android Keystore System对于任何此类目的,这是首选方法。
The Android Keystore system lets you store cryptographic keys in a container to make it more difficult to extract from the device. Once keys are in the keystore, they can be used for cryptographic operations with the key material remaining non-exportable.
和KeyStoreUsage.java是相同的例子。
关于java - 在 Android 中授权用户最安全的方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41845735/