flutter-openpgp icon indicating copy to clipboard operation
flutter-openpgp copied to clipboard

Can't decrypt flutter-openpgp encrypted content with bouncycastle.openpgp

Open volmus opened this issue 3 years ago • 2 comments

Hi!

I'm encrypting content with flutter-openpgp and trying to decrypt it in a java application using bouncycastle openpgp.

Bouncycastle openpgp throws this error:

java.lang.ClassCastException: org.bouncycastle.openpgp.PGPLiteralData cannot be cast to org.bouncycastle.openpgp.PGPCompressedData
java.lang.ClassCastException: org.bouncycastle.openpgp.PGPLiteralData cannot be cast to org.bouncycastle.openpgp.PGPCompressedData

I can decrypt the content using linux cli tools, so the content should be fine. Is there a way to encrypt content with flutter-openpgp so that it becomes PGPCompressedData instead of PGPLiteralData?

Thank you!

volmus avatar Dec 10 '20 11:12 volmus