【问题标题】:How can i convert from PKCS1 to PKCS8如何从 PKCS1 转换为 PKCS8
【发布时间】:2014-09-26 07:30:31
【问题描述】:

如何将使用“BouncyCastle”中的“PemWriter.class”编码的“PKCS1”“PEM”转换为“PKCS8”格式? 另外我必须指明我不想使用任何 sun.* 包。

谢谢!

【问题讨论】:

  • 你确定PKCS1 吗?

标签: java cryptography bouncycastle


【解决方案1】:

您只需要将 PKCS#1 中定义的 RsaPrivateKey 结构放入 PKCS#8 中定义的 PrivateKeyInfo 结构即可。

更多详情请看我之前对类似问题的回答https://stackoverflow.com/a/23864945/3325704

【讨论】:

    猜你喜欢
    • 2021-11-12
    • 2019-04-02
    • 2014-02-16
    • 1970-01-01
    • 1970-01-01
    • 2015-01-21
    • 2012-01-07
    • 1970-01-01
    • 2023-04-04
    相关资源
    最近更新 更多