|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.gsi.OpenSSLKey
org.globus.gsi.bc.BouncyCastleOpenSSLKey
public class BouncyCastleOpenSSLKey
BouncyCastle-based implementation of OpenSSLKey.
| Constructor Summary | |
|---|---|
BouncyCastleOpenSSLKey(java.io.InputStream is)
Reads a OpenSSL private key from the specified input stream. |
|
BouncyCastleOpenSSLKey(java.security.PrivateKey key)
Converts a RSAPrivateCrtKey into OpenSSL key. |
|
BouncyCastleOpenSSLKey(java.lang.String file)
Reads a OpenSSL private key from the specified file. |
|
BouncyCastleOpenSSLKey(java.lang.String algorithm,
byte[] data)
Initializes the OpenSSL key from raw byte array. |
|
| Method Summary | |
|---|---|
protected byte[] |
getEncoded(java.security.PrivateKey key)
|
protected java.security.PrivateKey |
getKey(java.lang.String alg,
byte[] data)
|
protected java.lang.String |
getProvider()
|
| Methods inherited from class org.globus.gsi.OpenSSLKey |
|---|
decrypt, decrypt, encrypt, encrypt, getEncoded, getPrivateKey, isEncrypted, setEncryptionAlgorithm, writeTo, writeTo, writeTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BouncyCastleOpenSSLKey(java.io.InputStream is)
throws java.io.IOException,
java.security.GeneralSecurityException
is - input stream with OpenSSL key in PEM format.
java.io.IOException - if I/O problems.
java.security.GeneralSecurityException - if problems with the key
public BouncyCastleOpenSSLKey(java.lang.String file)
throws java.io.IOException,
java.security.GeneralSecurityException
file - file containing the OpenSSL key in PEM format.
java.io.IOException - if I/O problems.
java.security.GeneralSecurityException - if problems with the keypublic BouncyCastleOpenSSLKey(java.security.PrivateKey key)
key - private key - must be a RSAPrivateCrtKey
public BouncyCastleOpenSSLKey(java.lang.String algorithm,
byte[] data)
throws java.security.GeneralSecurityException
algorithm - the algorithm of the key. Currently only RSA algorithm is
supported.data - the DER encoded key data. If RSA algorithm, the key must be in
PKCS#1 format.
java.security.GeneralSecurityException - if any security problems.| Method Detail |
|---|
protected java.security.PrivateKey getKey(java.lang.String alg,
byte[] data)
throws java.security.GeneralSecurityException
getKey in class OpenSSLKeyjava.security.GeneralSecurityExceptionprotected byte[] getEncoded(java.security.PrivateKey key)
getEncoded in class OpenSSLKeyprotected java.lang.String getProvider()
getProvider in class OpenSSLKey
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||