theautonomy / bouncycastle-gpg-example

Bouncy Castle OpenGPG encryption and decryption example
43 stars 35 forks source link

jdk1.8 Exception in thread "main" java.io.EOFException: Unexpected end of ZIP input stream #4

Open huliangshan123 opened 3 years ago

huliangshan123 commented 3 years ago

Exception in thread "main" java.io.EOFException: Unexpected end of ZIP input stream at org.bouncycastle.openpgp.PGPCompressedData$1.fill(Unknown Source) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158) at org.bouncycastle.bcpg.BCPGInputStream.read(Unknown Source) at org.bouncycastle.bcpg.BCPGInputStream$PartialInputStream.read(Unknown Source) at org.bouncycastle.bcpg.BCPGInputStream.read(Unknown Source) at org.bouncycastle.util.io.Streams.readFully(Unknown Source) at org.bouncycastle.bcpg.BCPGInputStream.readFully(Unknown Source) at org.bouncycastle.bcpg.BCPGInputStream.readFully(Unknown Source) at org.bouncycastle.bcpg.MPInteger.(Unknown Source) at org.bouncycastle.bcpg.SignaturePacket.(Unknown Source) at org.bouncycastle.bcpg.BCPGInputStream.readPacket(Unknown Source) at org.bouncycastle.openpgp.PGPSignature.(Unknown Source) at org.bouncycastle.openpgp.PGPObjectFactory.nextObject(Unknown Source) at com.test.pgp.bc.BCPGPDecryptor.decryptFile(BCPGPDecryptor.java:157) at com.test.pgp.bc.BCPGPDecryptor.decryptFile(BCPGPDecryptor.java:79) at com.test.pgp.bc.BCPGPDecryptor.decryptFile(BCPGPDecryptor.java:73) at com.test.pgp.bc.BCPGPDecryptor.decryptFile(BCPGPDecryptor.java:69) at com.test.pgp.bc.BCPGPTest.decryptSignedFile(BCPGPTest.java:55) at com.test.pgp.bc.BCPGPTest.main(BCPGPTest.java:15)

huliangshan123 commented 3 years ago

this method is decryptSignedFile, please help me

huliangshan123 commented 3 years ago

thank you very much