After discovering that I had hardcoded the public key in the encrypt method, I’ve got my unit tests passing and the old code decrypting what I’ve encrypted.
The following example is a little less verbose than my original decrypt example. You’ll need to pass in a PGPPublicKey, String (as byte[]), and an OutputStream.
PGPEncryptedDataGenerator encryptor =
[...]