Package org.pgpainless.key.parsing
Class KeyRingReader
- java.lang.Object
-
- org.pgpainless.key.parsing.KeyRingReader
-
public class KeyRingReader extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_ITERATIONS
static Charset
UTF8
-
Constructor Summary
Constructors Constructor Description KeyRingReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PGPKeyRingCollection
keyRingCollection(byte[] bytes, boolean isSilent)
PGPKeyRingCollection
keyRingCollection(InputStream inputStream, boolean isSilent)
PGPKeyRingCollection
keyRingCollection(String asciiArmored, boolean isSilent)
org.bouncycastle.openpgp.PGPPublicKeyRing
publicKeyRing(byte[] bytes)
org.bouncycastle.openpgp.PGPPublicKeyRing
publicKeyRing(InputStream inputStream)
org.bouncycastle.openpgp.PGPPublicKeyRing
publicKeyRing(String asciiArmored)
org.bouncycastle.openpgp.PGPPublicKeyRingCollection
publicKeyRingCollection(byte[] bytes)
org.bouncycastle.openpgp.PGPPublicKeyRingCollection
publicKeyRingCollection(InputStream inputStream)
org.bouncycastle.openpgp.PGPPublicKeyRingCollection
publicKeyRingCollection(String asciiArmored)
static PGPKeyRingCollection
readKeyRingCollection(InputStream inputStream, boolean isSilent)
static org.bouncycastle.openpgp.PGPPublicKeyRing
readPublicKeyRing(InputStream inputStream)
static org.bouncycastle.openpgp.PGPPublicKeyRing
readPublicKeyRing(InputStream inputStream, int maxIterations)
Read a public key ring from the providedInputStream
.static org.bouncycastle.openpgp.PGPPublicKeyRingCollection
readPublicKeyRingCollection(InputStream inputStream)
static org.bouncycastle.openpgp.PGPPublicKeyRingCollection
readPublicKeyRingCollection(InputStream inputStream, int maxIterations)
Read a public key ring collection from the providedInputStream
.static org.bouncycastle.openpgp.PGPSecretKeyRing
readSecretKeyRing(InputStream inputStream)
static org.bouncycastle.openpgp.PGPSecretKeyRing
readSecretKeyRing(InputStream inputStream, int maxIterations)
Read a secret key ring from the providedInputStream
.static org.bouncycastle.openpgp.PGPSecretKeyRingCollection
readSecretKeyRingCollection(InputStream inputStream)
static org.bouncycastle.openpgp.PGPSecretKeyRingCollection
readSecretKeyRingCollection(InputStream inputStream, int maxIterations)
Read a secret key ring collection from the providedInputStream
.org.bouncycastle.openpgp.PGPSecretKeyRing
secretKeyRing(byte[] bytes)
org.bouncycastle.openpgp.PGPSecretKeyRing
secretKeyRing(InputStream inputStream)
org.bouncycastle.openpgp.PGPSecretKeyRing
secretKeyRing(String asciiArmored)
org.bouncycastle.openpgp.PGPSecretKeyRingCollection
secretKeyRingCollection(byte[] bytes)
org.bouncycastle.openpgp.PGPSecretKeyRingCollection
secretKeyRingCollection(InputStream inputStream)
org.bouncycastle.openpgp.PGPSecretKeyRingCollection
secretKeyRingCollection(String asciiArmored)
-
-
-
Field Detail
-
MAX_ITERATIONS
public static final int MAX_ITERATIONS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KeyRingReader
public KeyRingReader()
-
-
Method Detail
-
publicKeyRing
public org.bouncycastle.openpgp.PGPPublicKeyRing publicKeyRing(@Nonnull InputStream inputStream) throws IOException
- Throws:
IOException
-
publicKeyRing
public org.bouncycastle.openpgp.PGPPublicKeyRing publicKeyRing(@Nonnull byte[] bytes) throws IOException
- Throws:
IOException
-
publicKeyRing
public org.bouncycastle.openpgp.PGPPublicKeyRing publicKeyRing(@Nonnull String asciiArmored) throws IOException
- Throws:
IOException
-
publicKeyRingCollection
public org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyRingCollection(@Nonnull InputStream inputStream) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
publicKeyRingCollection
public org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyRingCollection(@Nonnull byte[] bytes) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
publicKeyRingCollection
public org.bouncycastle.openpgp.PGPPublicKeyRingCollection publicKeyRingCollection(@Nonnull String asciiArmored) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
secretKeyRing
public org.bouncycastle.openpgp.PGPSecretKeyRing secretKeyRing(@Nonnull InputStream inputStream) throws IOException
- Throws:
IOException
-
secretKeyRing
public org.bouncycastle.openpgp.PGPSecretKeyRing secretKeyRing(@Nonnull byte[] bytes) throws IOException
- Throws:
IOException
-
secretKeyRing
public org.bouncycastle.openpgp.PGPSecretKeyRing secretKeyRing(@Nonnull String asciiArmored) throws IOException
- Throws:
IOException
-
secretKeyRingCollection
public org.bouncycastle.openpgp.PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull InputStream inputStream) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
secretKeyRingCollection
public org.bouncycastle.openpgp.PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull byte[] bytes) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
secretKeyRingCollection
public org.bouncycastle.openpgp.PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull String asciiArmored) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
keyRingCollection
public PGPKeyRingCollection keyRingCollection(@Nonnull InputStream inputStream, boolean isSilent) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
keyRingCollection
public PGPKeyRingCollection keyRingCollection(@Nonnull byte[] bytes, boolean isSilent) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
keyRingCollection
public PGPKeyRingCollection keyRingCollection(@Nonnull String asciiArmored, boolean isSilent) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
readPublicKeyRing
public static org.bouncycastle.openpgp.PGPPublicKeyRing readPublicKeyRing(@Nonnull InputStream inputStream) throws IOException
- Throws:
IOException
-
readPublicKeyRing
public static org.bouncycastle.openpgp.PGPPublicKeyRing readPublicKeyRing(@Nonnull InputStream inputStream, int maxIterations) throws IOException
Read a public key ring from the providedInputStream
. If more than maxIterations PGP packets are encountered before aPGPPublicKeyRing
is read, anIOException
is thrown.- Parameters:
inputStream
- input streammaxIterations
- max iterations before abort- Returns:
- public key ring
- Throws:
IOException
-
readPublicKeyRingCollection
public static org.bouncycastle.openpgp.PGPPublicKeyRingCollection readPublicKeyRingCollection(@Nonnull InputStream inputStream) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
readPublicKeyRingCollection
public static org.bouncycastle.openpgp.PGPPublicKeyRingCollection readPublicKeyRingCollection(@Nonnull InputStream inputStream, int maxIterations) throws IOException, org.bouncycastle.openpgp.PGPException
Read a public key ring collection from the providedInputStream
. If more than maxIterations PGP packets are encountered before the stream is exhausted, anIOException
is thrown.- Parameters:
inputStream
- input streammaxIterations
- max iterations before abort- Returns:
- public key ring collection
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
readSecretKeyRing
public static org.bouncycastle.openpgp.PGPSecretKeyRing readSecretKeyRing(@Nonnull InputStream inputStream) throws IOException
- Throws:
IOException
-
readSecretKeyRing
public static org.bouncycastle.openpgp.PGPSecretKeyRing readSecretKeyRing(@Nonnull InputStream inputStream, int maxIterations) throws IOException
Read a secret key ring from the providedInputStream
. If more than maxIterations PGP packets are encountered before aPGPSecretKeyRing
is read, anIOException
is thrown.- Parameters:
inputStream
- input streammaxIterations
- max iterations before abort- Returns:
- public key ring
- Throws:
IOException
-
readSecretKeyRingCollection
public static org.bouncycastle.openpgp.PGPSecretKeyRingCollection readSecretKeyRingCollection(@Nonnull InputStream inputStream) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
readSecretKeyRingCollection
public static org.bouncycastle.openpgp.PGPSecretKeyRingCollection readSecretKeyRingCollection(@Nonnull InputStream inputStream, int maxIterations) throws IOException, org.bouncycastle.openpgp.PGPException
Read a secret key ring collection from the providedInputStream
. If more than maxIterations PGP packets are encountered before the stream is exhausted, anIOException
is thrown.- Parameters:
inputStream
- input streammaxIterations
- max iterations before abort- Returns:
- secret key ring collection
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
readKeyRingCollection
public static PGPKeyRingCollection readKeyRingCollection(@Nonnull InputStream inputStream, boolean isSilent) throws IOException, org.bouncycastle.openpgp.PGPException
- Throws:
IOException
org.bouncycastle.openpgp.PGPException
-
-