mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 14:22:05 +01:00
Add getMarkerPacket() test method
This commit is contained in:
parent
be4962c531
commit
0330d3cfa3
1 changed files with 12 additions and 0 deletions
|
@ -15,12 +15,17 @@
|
|||
*/
|
||||
package org.pgpainless.util;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bouncycastle.bcpg.BCPGInputStream;
|
||||
import org.bouncycastle.bcpg.MarkerPacket;
|
||||
|
||||
public class TestUtils {
|
||||
|
||||
public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
|
@ -49,4 +54,11 @@ public class TestUtils {
|
|||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static MarkerPacket getMarkerPacket() throws IOException {
|
||||
BCPGInputStream pgpIn = new BCPGInputStream(new ByteArrayInputStream("PGP".getBytes(StandardCharsets.UTF_8)));
|
||||
MarkerPacket markerPacket = new MarkerPacket(pgpIn);
|
||||
pgpIn.close();
|
||||
return markerPacket;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue