public class PKCS8DERReader extends PEMReader
PEMReader
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 InputStream |
is |
protected PasswordFinder |
myPFinder |
Constructor and Description |
---|
PKCS8DERReader(InputStream is) |
PKCS8DERReader(InputStream is,
PasswordFinder pFinder) |
Modifier and Type | Method and Description |
---|---|
PemObject |
readPemObject()
Generate BC's PemObject from the input stream.
|
readObject
close, mark, markSupported, read, read, readLine, ready, reset, skip
protected InputStream is
protected PasswordFinder myPFinder
public PKCS8DERReader(InputStream is, PasswordFinder pFinder)
public PKCS8DERReader(InputStream is)
public PemObject readPemObject() throws IOException
readPemObject
in class PemReader
IOException
Copyright © 2012-2014 European Middleware Initiative. All Rights Reserved.