|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.security.util.PrivateKeyReader
public class PrivateKeyReader
This class is used to read a private key.
Constructor Summary | |
---|---|
PrivateKeyReader()
|
Method Summary | |
---|---|
static byte[] |
getEncoded(java.security.PrivateKey inKey)
Return a PKCS1v2 representation of the key. |
static java.lang.String |
getPEM(java.security.PrivateKey inKey)
Return a PEM formatted PKCS1v2 representation of the key. |
static java.security.PrivateKey |
read(java.io.BufferedInputStream bin)
Reads the private key form the stream that was given in the constructor. |
static java.security.PrivateKey |
read(java.io.BufferedInputStream bin,
org.bouncycastle.openssl.PasswordFinder finder)
Reads the private key form the stream that was given in the constructor. |
static java.security.PrivateKey |
read(java.io.BufferedInputStream bin,
java.lang.String passwd)
Reads the private key form the stream that was given in the constructor. |
static void |
skipLine(java.io.BufferedInputStream stream)
Skips to the next line. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrivateKeyReader()
Method Detail |
---|
public static java.security.PrivateKey read(java.io.BufferedInputStream bin, org.bouncycastle.openssl.PasswordFinder finder) throws java.io.IOException
bin
- The BufferedInputStream to read the key from.finder
- The password finder class to use for requesting the password.
java.io.IOException
- Thrown if the key reading fails.public static java.security.PrivateKey read(java.io.BufferedInputStream bin) throws java.io.IOException
bin
- The BufferedInputStream to read the key from.
java.io.IOException
- Thrown if the key reading fails.public static java.security.PrivateKey read(java.io.BufferedInputStream bin, java.lang.String passwd) throws java.io.IOException
bin
- The BufferedInputStream to read the key from.passwd
- The password to use to access the private key.
java.io.IOException
- Thrown if the key reading fails.public static void skipLine(java.io.BufferedInputStream stream) throws java.io.IOException
stream
- the input stream.
java.io.IOException
- thrown in case of read error.public static byte[] getEncoded(java.security.PrivateKey inKey)
inKey
- the key to encode.
public static java.lang.String getPEM(java.security.PrivateKey inKey)
inKey
- the key to encode.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |