Package org.bouncycastle.openpgp.api
Class OpenPGPKeyReader
java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPKeyReader
Reader for
OpenPGPKeys
or OpenPGPCertificates
.-
Constructor Summary
ConstructorsConstructorDescriptionOpenPGPKeyReader
(OpenPGPImplementation implementation) OpenPGPKeyReader
(OpenPGPImplementation implementation, OpenPGPPolicy policy) -
Method Summary
Modifier and TypeMethodDescriptionparseCertificate
(byte[] bytes) Parse a singleOpenPGPCertificate
from bytes.parseCertificate
(InputStream inputStream) Parse a singleOpenPGPCertificate
from anInputStream
.parseCertificate
(String armored) Parse a singleOpenPGPCertificate
from an ASCII armored string.parseCertificateOrKey
(byte[] bytes) Parse a singleOpenPGPCertificate
orOpenPGPKey
from bytes.parseCertificateOrKey
(InputStream inputStream) parseCertificateOrKey
(String armored) Parse a singleOpenPGPCertificate
orOpenPGPKey
from an ASCII armored string.parseCertificates
(byte[] bytes) parseCertificates
(InputStream inputStream) parseCertificates
(String armored) parseKey
(byte[] bytes) Parse anOpenPGPKey
from bytes.parseKey
(InputStream inputStream) Parse anOpenPGPKey
from anInputStream
Parse anOpenPGPKey
from an ASCII armored string.parseKeys
(byte[] bytes) parseKeys
(InputStream inputStream) parseKeysOrCertificates
(byte[] bytes) parseKeysOrCertificates
(InputStream inputStream) parseKeysOrCertificates
(String armored)
-
Constructor Details
-
OpenPGPKeyReader
public OpenPGPKeyReader() -
OpenPGPKeyReader
-
OpenPGPKeyReader
-
-
Method Details
-
parseCertificate
Parse a singleOpenPGPCertificate
from an ASCII armored string.- Parameters:
armored
- ASCII armored string- Returns:
- parsed certificate
- Throws:
IOException
- if the parsed object is a secret key or if the cert cannot be parsed
-
parseCertificate
Parse a singleOpenPGPCertificate
from anInputStream
.- Parameters:
inputStream
- ASCII armored or binary input stream- Returns:
- parsed certificate
- Throws:
IOException
- if the parsed object is a secret key or if the cert cannot be parsed
-
parseCertificate
Parse a singleOpenPGPCertificate
from bytes.- Parameters:
bytes
- ASCII armored or binary bytes- Returns:
- parsed certificate
- Throws:
IOException
- if the parsed object is a secret key or if the cert cannot be parsed
-
parseCertificateOrKey
Parse a singleOpenPGPCertificate
orOpenPGPKey
from an ASCII armored string.- Parameters:
armored
- ASCII armored string- Returns:
- parsed certificate or key
- Throws:
IOException
- if the key or certificate cannot be parsed
-
parseCertificateOrKey
- Parameters:
inputStream
- input stream containing the ASCII armored or binary key or certificate- Returns:
- parsed certificate or key
- Throws:
IOException
- if the key or certificate cannot be parsed
-
parseCertificateOrKey
Parse a singleOpenPGPCertificate
orOpenPGPKey
from bytes.- Parameters:
bytes
- ASCII armored or binary key or certificate- Returns:
- parsed certificate or key
- Throws:
IOException
- if the key or certificate cannot be parsed
-
parseKey
Parse anOpenPGPKey
from an ASCII armored string.- Parameters:
armored
- ASCII armored string- Returns:
- parsed key
- Throws:
IOException
- if the key cannot be parsed.
-
parseKey
Parse anOpenPGPKey
from anInputStream
- Parameters:
inputStream
- containing the ASCII armored or binary key- Returns:
- parsed key
- Throws:
IOException
- if the key cannot be parsed.
-
parseKey
Parse anOpenPGPKey
from bytes.- Parameters:
bytes
- ASCII armored or binary key- Returns:
- parsed key
- Throws:
IOException
- if the key cannot be parsed.
-
parseKeysOrCertificates
- Throws:
IOException
-
parseKeysOrCertificates
- Throws:
IOException
-
parseKeysOrCertificates
- Throws:
IOException
-
parseCertificates
- Throws:
IOException
-
parseCertificates
- Throws:
IOException
-
parseCertificates
- Throws:
IOException
-
parseKeys
- Throws:
IOException
-
parseKeys
- Throws:
IOException
-
parseKeys
- Throws:
IOException
-