We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您可以尝试调用BouncyCastle.org的JAVA API。
其文档提到:
你在这里openpgp ByteArrayHandler 的示例。
BouncyCastle 加密和 GnuGP 加密之间可能存在一些不兼容性不过,由于 BouncyCastle 不使用 GnuPG,而是在 Java 中实现 OpenPGP (RFC2440)。
You can try to call the JAVA API of BouncyCastle.org.
Its documentation mentions:
You have here an example of openpgp ByteArrayHandler.
There might be some incompatibility between BouncyCastle encryption and GnuGP encryption though, since BouncyCastle does not use GnuPG, but rather implements OpenPGP (RFC2440) in Java.
我最近不得不研究 GPG 加密解密,并发现 BountyCastle 的 PGP 库可以解决这个问题。步骤是
1) 在 pom.xml 属性中添加版本
2) 添加以下依赖项
3) 在实现类中添加具有 Java 安全性的提供程序
4) 其余代码只是简单的 Java 实现
我希望这会有所帮助。
I recently had to work on GPG encryption-decryption and did find BountyCastle's PGP library does the trick. The steps were
1) Add the version in pom.xml properties
2) Add the following dependencies
3) In the implementation class added the provider with Java Security
4) The rest of the code was just simple Java implementation
I hope this helps.
有 https://github.com/smartrevolution/gnupg-for-java 这是基于 gpgme,并在 GnuPG 1.4 之上工作。我们正在将其更新为 GnuPG 2.x 并在我们的 Android 应用程序中使用它。您可以在此处获取代码:
There is https://github.com/smartrevolution/gnupg-for-java which is based on gpgme, and works on top of GnuPG 1.4. We're updating it for GnuPG 2.x and are using it in our Android app. You can get the code to those here: