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 singleOpenPGPCertificatefrom bytes.parseCertificate(InputStream inputStream) Parse a singleOpenPGPCertificatefrom anInputStream.parseCertificate(String armored) Parse a singleOpenPGPCertificatefrom an ASCII armored string.parseCertificateOrKey(byte[] bytes) Deprecated.parseCertificateOrKey(InputStream inputStream) Deprecated.useparseKeyOrCertificate(InputStream)instead.parseCertificateOrKey(String armored) Deprecated.useparseKeyOrCertificate(String)instead.parseCertificates(byte[] bytes) parseCertificates(InputStream inputStream) parseCertificates(String armored) parseKey(byte[] bytes) Parse anOpenPGPKeyfrom bytes.parseKey(InputStream inputStream) Parse anOpenPGPKeyfrom anInputStreamParse anOpenPGPKeyfrom an ASCII armored string.parseKeyOrCertificate(byte[] bytes) Parse a singleOpenPGPCertificateorOpenPGPKeyfrom bytes.parseKeyOrCertificate(InputStream inputStream) parseKeyOrCertificate(String armored) Parse a singleOpenPGPCertificateorOpenPGPKeyfrom 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 singleOpenPGPCertificatefrom 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 singleOpenPGPCertificatefrom 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 singleOpenPGPCertificatefrom 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
Deprecated.useparseKeyOrCertificate(String)instead.Parse a singleOpenPGPCertificateorOpenPGPKeyfrom 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
@Deprecated public OpenPGPCertificate parseCertificateOrKey(InputStream inputStream) throws IOException Deprecated.useparseKeyOrCertificate(InputStream)instead.- 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
Deprecated.useparseKeyOrCertificate(byte[])instead.Parse a singleOpenPGPCertificateorOpenPGPKeyfrom 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
-
parseKeyOrCertificate
Parse a singleOpenPGPCertificateorOpenPGPKeyfrom an ASCII armored string.- Parameters:
armored- ASCII armored string- Returns:
- parsed certificate or key
- Throws:
IOException- if the key or certificate cannot be parsed
-
parseKeyOrCertificate
- 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
-
parseKeyOrCertificate
Parse a singleOpenPGPCertificateorOpenPGPKeyfrom 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 anOpenPGPKeyfrom an ASCII armored string.- Parameters:
armored- ASCII armored string- Returns:
- parsed key
- Throws:
IOException- if the key cannot be parsed.
-
parseKey
Parse anOpenPGPKeyfrom anInputStream- Parameters:
inputStream- containing the ASCII armored or binary key- Returns:
- parsed key
- Throws:
IOException- if the key cannot be parsed.
-
parseKey
Parse anOpenPGPKeyfrom 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
-
parseKeyOrCertificate(byte[])instead.