org.globus.gsi.bc
Class BouncyCastleOpenSSLKey

java.lang.Object
  extended byorg.globus.gsi.OpenSSLKey
      extended byorg.globus.gsi.bc.BouncyCastleOpenSSLKey

public class BouncyCastleOpenSSLKey
extends OpenSSLKey

BouncyCastle-based implementation of OpenSSLKey.


Field Summary
 
Fields inherited from class org.globus.gsi.OpenSSLKey
HEADER
 
Constructor Summary
BouncyCastleOpenSSLKey(InputStream is)
           
BouncyCastleOpenSSLKey(PrivateKey key)
           
BouncyCastleOpenSSLKey(String file)
           
BouncyCastleOpenSSLKey(String algorithm, byte[] data)
           
 
Method Summary
protected  byte[] getEncoded(PrivateKey key)
          Returns DER encoded byte array (PKCS#1).
protected  PrivateKey getKey(String alg, byte[] data)
          Returns PrivateKey object initialized from give byte array (in PKCS#1 format)
protected  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

BouncyCastleOpenSSLKey

public BouncyCastleOpenSSLKey(InputStream is)
                       throws IOException,
                              GeneralSecurityException

BouncyCastleOpenSSLKey

public BouncyCastleOpenSSLKey(String file)
                       throws IOException,
                              GeneralSecurityException

BouncyCastleOpenSSLKey

public BouncyCastleOpenSSLKey(PrivateKey key)

BouncyCastleOpenSSLKey

public BouncyCastleOpenSSLKey(String algorithm,
                              byte[] data)
                       throws GeneralSecurityException
Method Detail

getKey

protected PrivateKey getKey(String alg,
                            byte[] data)
                     throws GeneralSecurityException
Description copied from class: OpenSSLKey
Returns PrivateKey object initialized from give byte array (in PKCS#1 format)

Specified by:
getKey in class OpenSSLKey
Throws:
GeneralSecurityException

getEncoded

protected byte[] getEncoded(PrivateKey key)
Description copied from class: OpenSSLKey
Returns DER encoded byte array (PKCS#1).

Specified by:
getEncoded in class OpenSSLKey

getProvider

protected String getProvider()
Overrides:
getProvider in class OpenSSLKey