java中pgp_如何用Java生成PGP证书(How to generate a PGP Certificate in Java)

本文解释了BouncyCastle中证书与密钥的区别,并指导如何正确处理OpenPGP密钥对,包括公钥环和私钥环的使用。此外,还介绍了存储这些密钥的具体方式以及建议读者在使用相关类之前了解PGP和GNU Privacy Guard的基本概念。
摘要由CSDN通过智能技术生成

Bouncy Castle can do that, you're just mixing up certificates vs. keys, as Eugene suggested.

It's X509 Certificate, and an OpenPGP keypair. Certificates are stored in a certificate store, and OpenPGP keys are stored in a keyring.

If you want to import the OpenPGP keypair you generated, you need to deal with a public keyring and a secret keyring (optional, if you have the private part of the key).

Those methods are static, be sure to generate a keyring beforhand (i.e. a certificate-store alike). Furthermore you should read about PGP's or gnupgs basic concecpt, before using these classes.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值