-
public interface PEMParserImplementations of this interface provide the functionality for parsing PEM format.
Usually, an instance of this interface is obtained by using a factory method of
PEMParsers.WARNING:Implementations of this interface are intended to parse PEM-encoded texts originated from trusted sources(e.g. a PEM file created by yourself). Be careful if you parse data originated from untrusted sources.
Thread Safety:Depends on implementations. See
PEMParsers.- Author:
- Tomoki Sato
- See Also:
PEMParsers
-
-
Field Summary
Fields Modifier and Type Field Description static StringBEGIN_ENCAPSULATION_BOUNDARIES_FMRThe format string used to make a pre-encapsulation boundary.static StringEND_ENCAPSULATION_BOUNDARIES_FMRThe format string used to make a post-encapsulation boundary.static StringPKCS8_PRIVATE_KEY_LABELThe type label in an encapsulation boundary indicating that the content is a PKCS #8 Private Key Info.static StringSUBJECT_PUBLIC_KEY_INFO_LABELThe type label in an encapsulation boundary indicating that the content is a Subject Public Key Info.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]parse(String pemText)Parses the given PEM-encoded text and extracts its content.
-
-
-
Field Detail
-
BEGIN_ENCAPSULATION_BOUNDARIES_FMR
static final String BEGIN_ENCAPSULATION_BOUNDARIES_FMR
The format string used to make a pre-encapsulation boundary.- See Also:
- Constant Field Values
-
END_ENCAPSULATION_BOUNDARIES_FMR
static final String END_ENCAPSULATION_BOUNDARIES_FMR
The format string used to make a post-encapsulation boundary.- See Also:
- Constant Field Values
-
PKCS8_PRIVATE_KEY_LABEL
static final String PKCS8_PRIVATE_KEY_LABEL
The type label in an encapsulation boundary indicating that the content is a PKCS #8 Private Key Info.- See Also:
- Constant Field Values
-
SUBJECT_PUBLIC_KEY_INFO_LABEL
static final String SUBJECT_PUBLIC_KEY_INFO_LABEL
The type label in an encapsulation boundary indicating that the content is a Subject Public Key Info.- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
byte[] parse(String pemText)
Parses the given PEM-encoded text and extracts its content.- Parameters:
pemText- a PEM-encoded text- Returns:
- the content extracted from the given PEM-encoded text.
- Throws:
MalformedPEMException- if the given text cannot be parsed as a valid PEM format.
-
-