|
||||||||||
| 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 and write private keys.
| Constructor Summary | |
|---|---|
PrivateKeyReader()
|
|
| Method Summary | |
|---|---|
static java.security.PrivateKey |
backupPKCS8Reader(java.io.BufferedReader reader)
The backup implementation for reading pkcs#8 private keys until bouncycastle implementation is released. |
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)
Deprecated. Rather use the method with reader argument. |
static java.security.PrivateKey |
read(java.io.BufferedInputStream bin,
org.bouncycastle.openssl.PasswordFinder finder)
Deprecated. use rather the read method with reader input. |
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 java.security.PrivateKey |
read(java.io.BufferedReader reader)
Reads the private key form the stream that was given in the constructor. |
static java.security.PrivateKey |
read(java.io.BufferedReader reader,
org.bouncycastle.openssl.PasswordFinder finder)
Reads the private key form the stream that was given in the constructor. |
static void |
skipLine(java.io.BufferedInputStream stream)
Deprecated. do not use, use bufferedReader.readline instead. Scheduled for removal. |
| 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.BufferedReader reader,
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.BufferedReader reader)
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.
public static java.security.PrivateKey backupPKCS8Reader(java.io.BufferedReader reader)
throws java.io.IOException
reader - the reader to read the pem encoded key from.
java.io.IOException - in case the reading fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||