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