java.security.KeyStore使用什么算法来加密KeyStore.setKeyEntry()和KeyStore.store()中的privateKey?

发布于 2024-09-14 07:00:14 字数 132 浏览 1 评论 0原文

setKeyEntry() 允许密码保护单个私钥,store() 允许密码加密整个 keyStore。我使用 pkcs12 密钥库类型,并以 BC 作为提供程序,但我无法弄清楚它用于加密的内容。

我可以指定这些方法中使用的加密类型吗?

setKeyEntry() allows a password to protect a single private key, and store() allows a password to encrypt the entire keyStore. I'm using pkcs12 keystore type with the BC as the provider, and I can't figure out what it's using for encryption.

Am I able to specify the kind of encryption used in these methods?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

左耳近心 2024-09-21 07:00:14

KeyStore 实现取决于您请求的类型,对于某些类型,还取决于提供程序。

如果您谈论的是“JKS”类型,您可以在此处找到所使用的格式和算法的描述。

对于 JKS 密钥存储,您无法指定私钥的加密算法。

The KeyStore implementation depends on the type you request, and for some types, will depend on the provider as well.

If you are talking about the "JKS" type, you can find a description of the format and algorithms used here.

With a JKS key store, you cannot specify an encryption algorithm for private keys.

半衬遮猫 2024-09-21 07:00:14

这取决于您是哪个 KeyStore 提供商使用。

JCEKS 提供程序使用 PBEWithMD5AndTripleDES 基于密码的加密算法。

It depends on which KeyStore provider you are using.

The JCEKS provider uses PBEWithMD5AndTripleDES password-based encryption algorithm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文