小编Unn*_*ser的帖子

Java:使用 Bouncy Castle 的 PGP 加密

我正在尝试使用 PGP 实现加密,并且我的加密方法成功地加密了输入字符串,但是当我尝试对其进行解密以验证加密是否正确完成时,该字符串没有被解密。

我尝试了两种方法:

1st approach uses FileOutputStream to write encrypted string & 2nd approach uses ByteArrayOutputStream. FileOutputStream creates a file and I am able to decrypt it using Kleopatra. However my requirement is to just get an encrypted string (not written in a file). So when I try to decrypt the encrypted string (received after using ByteArrayOutputStream) its not working. I tried copying the string and decrypting it through tools>>clipboard in Kleopatra, but the decrypt/verify option is …

java encryption bouncycastle openpgp

2
推荐指数
1
解决办法
6824
查看次数

标签 统计

bouncycastle ×1

encryption ×1

java ×1

openpgp ×1