Android Keystore LoadStore 和 ProtectionParameter 实现实例?
Android Keystore LoadStore and ProtectionParameter implementation examples?
文档说:
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
请提供任何带有 非空 参数的示例(例如真正执行某些操作的已实现接口)?目前唯一的可能性是 PasswordProtection 还是有自定义实现?也许有一些解释为什么它在所有文档中都不重要以及何时可能变得重要?你的建议真的很有价值。谢谢。
其实KeyStore Documentation using the KeyStore.PasswordProtection里面有一个例子non-null。
另一个"implementation"(这只是一个标记界面)是KeyProtection,除了其他示例,您还可以在其中找到对其用途的解释:
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.
文档说:
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
请提供任何带有 非空 参数的示例(例如真正执行某些操作的已实现接口)?目前唯一的可能性是 PasswordProtection 还是有自定义实现?也许有一些解释为什么它在所有文档中都不重要以及何时可能变得重要?你的建议真的很有价值。谢谢。
其实KeyStore Documentation using the KeyStore.PasswordProtection里面有一个例子non-null。
另一个"implementation"(这只是一个标记界面)是KeyProtection,除了其他示例,您还可以在其中找到对其用途的解释:
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.