【问题标题】:How to add expiry date when generating Bouncy Castle PGP key pair?生成 Bouncy Castle PGP 密钥对时如何添加到期日期?
【发布时间】:2022-02-02 23:50:06
【问题描述】:

我关注https://bouncycastle-pgp-cookbook.blogspot.com/ 来生成 PGP 密钥对。它适用于生成的 pub 和私钥文件。但是当我查看 pub 密钥时,它没有到期日期。我在 PGPSignatureSubpacketGenerator 上设置了密钥过期时间。 signhashgen.setKeyExpirationTime(true, 864000);

【问题讨论】:

    标签: java cryptography bouncycastle


    【解决方案1】:

    我花了几个小时才找到答案。由于我在 PGPKeyPair 中有两个子包,我必须在两个子包上设置到期日期。然后到期日期将显示在证书和子密钥详细信息中,如屏幕截图所示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-04
      • 2018-02-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多