BouncyCastle 从现有密钥创建 AsymmetryCipherKeyPair?
我有两个 AssymetricAlgorithm
RSA 密钥,它们是从我的密钥库中的证书中提取的。一个是公钥,另一个是私钥。有没有办法将此密钥对放入 BouncyCastle AsymmetryCipherKeyPair 中? BouncyCastle 的 AmetryCipherKeyPair
需要一个公共和私有的 AmetryKeyParameter
,但是如果不是 AssymetricAlgorithm
的实例,我无法获取我的私钥。
I have two AssymetricAlgorithm
RSA keys that I have pulled out of a certificate that was in my keystore. One is the Public Key and the other the Private. Is there a way of getting this keypair into a BouncyCastle AsymmetricCipherKeyPair? BouncyCastle's AsymmetricCipherKeyPair
expects a public and private AsymmetricKeyParameter
however I have no way of getting my Private key without it being an instance of AssymetricAlgorithm
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
答案就在这里:
从 BouncyCastle X509 证书获取私钥? C#
The answer to this lies here:
Get Private Key from BouncyCastle X509 Certificate? C#
我认为如果密钥被标记为可导出,这会有所帮助
I think this will help if key is marked as exportable