mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-08 21:31:08 +01:00
Rework OpenPGPInputStream to rely on BCPGInputStream for packet parsing
This commit is contained in:
parent
05ea7bd94f
commit
dc2fe5d65a
2 changed files with 117 additions and 213 deletions
|
|
@ -20,6 +20,7 @@ import org.bouncycastle.bcpg.CompressionAlgorithmTags;
|
|||
import org.bouncycastle.openpgp.PGPCompressedDataGenerator;
|
||||
import org.bouncycastle.openpgp.PGPException;
|
||||
import org.bouncycastle.openpgp.api.OpenPGPKey;
|
||||
import org.bouncycastle.util.encoders.Hex;
|
||||
import org.bouncycastle.util.io.Streams;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.pgpainless.PGPainless;
|
||||
|
|
@ -41,7 +42,8 @@ public class OpenPgpInputStreamTest {
|
|||
|
||||
OpenPgpInputStream openPgpInputStream = new OpenPgpInputStream(randomIn);
|
||||
assertFalse(openPgpInputStream.isAsciiArmored());
|
||||
assertFalse(openPgpInputStream.isLikelyOpenPgpMessage());
|
||||
assertFalse(openPgpInputStream.isLikelyOpenPgpMessage(),
|
||||
Hex.toHexString(randomBytes, 0, 150));
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
Streams.pipeAll(openPgpInputStream, out);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue