public class PKCS8DERReader
extends org.bouncycastle.openssl.PEMParser
PEMParser
class from the BC library.
It is modified to read DER input, not the PEM (it can be considered a smart-hack)
as otherwise BC's parsers code would need to be copied. It supports reading of the
PKCS8 private key in DER form. It is assumed that the key is encrypted if
a password is provided.
This class interface is the readObject method.
This implementation overrides the
PemReader
readPemObject method to actually read the DER. The Reader used by
the PemReader
is not used.
Modifier and Type | Field and Description |
---|---|
protected boolean |
encrypted |
protected InputStream |
is |
Constructor and Description |
---|
PKCS8DERReader(InputStream is,
boolean encrypted) |
Modifier and Type | Method and Description |
---|---|
PemObject |
readPemObject()
Generate BC's PemObject from the input stream.
|
protected InputStream is
protected boolean encrypted
public PKCS8DERReader(InputStream is, boolean encrypted)
public PemObject readPemObject() throws IOException
readPemObject
in class PemReader
IOException
- IO exceptionCopyright © 2012-2017 European Middleware Initiative. All Rights Reserved.