Java Globus API: Class BouncyCastleOpenSSLKey

org.globus.gsi.bc
Class BouncyCastleOpenSSLKey

java.lang.Object
  |
  +--org.globus.gsi.OpenSSLKey
        |
        +--org.globus.gsi.bc.BouncyCastleOpenSSLKey

public class BouncyCastleOpenSSLKey
extends OpenSSLKey

BouncyCastle-based implementation of OpenSSLKey.


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, getPrivateKey, isEncrypted, 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)
Overrides:
getKey in class OpenSSLKey

getEncoded

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

getProvider

protected String getProvider()
Overrides:
getProvider in class OpenSSLKey