Android Keystore LoadStore 和 ProtectionParameter 实现实例?

标签 android security android-keystore

文档说:

The information stored in a ProtectionParameter object protects the contents of a keystore. For example, protection parameters may be used to check the integrity of keystore data, or to protect the confidentiality of sensitive keystore data (such as a PrivateKey).

但每个示例都只是传递 null 可以使用此参数的地方:

keystore.load(null);// here
KeyStore.Entry entry = keystore.getEntry(alias, null);//and here

请提供任何带有非空 参数的示例(例如真正执行某些操作的已实现接口(interface))?目前唯一的可能性是PasswordProtection或者有自定义实现?也许有一些解释为什么它在所有文档中都不重要以及何时可能变得重要?你的建议真的很有值(value)。谢谢。

最佳答案

其实KeyStore Documentation里面有一个非空的例子使用 KeyStore.PasswordProtection .

另一个“实现”(这只是一个标记接口(interface))是KeyProtection ,除了其他示异常(exception),您还可以在其中找到对其用途的解释:

Specification of how a key or key pair is secured when imported into the Android Keystore system. This class specifies authorized uses of the imported key, such as whether user authentication is required for using the key, what operations the key is authorized for (e.g., decryption, but not signing) with what parameters (e.g., only with a particular padding scheme or digest), and the key's validity start and end dates.

关于Android Keystore LoadStore 和 ProtectionParameter 实现实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37905482/

相关文章:

android - 我找不到 Android key 工具

android - 我们可以从 Android Keystore 中提取公钥/私钥吗?

android - 如何使用 onPause(后退按钮)发送结果 Intent

java - 如何防止他人入侵我的小程序?

java - 当盐值更改时,基于密码的加密失败

Android,生成数字 Assets 链接 : keystore file for signing the app

java - Android中Activity切换时如何保存数据

android - NotificationCompat.Builder 中通知时出现 NullPointerException

android - 什么是 Android 应用程序中的 "bundle"

java - 登录我的 Java Web 应用程序时,我被定向到登录表单使用的 CSS,如何解决这个问题?