org.bouncycastle.jce.provider
Class JCERSAPrivateKey

java.lang.Object
  extended by org.bouncycastle.jce.provider.JCERSAPrivateKey
All Implemented Interfaces:
java.io.Serializable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateKey, java.security.Key, java.security.PrivateKey, PKCS12BagAttributeCarrier
Direct Known Subclasses:
JCERSAPrivateCrtKey

public class JCERSAPrivateKey
extends java.lang.Object
implements java.security.interfaces.RSAPrivateKey, PKCS12BagAttributeCarrier

See Also:
Serialized Form

Field Summary
private  PKCS12BagAttributeCarrierImpl attrCarrier
           
protected  java.math.BigInteger modulus
           
protected  java.math.BigInteger privateExponent
           
(package private) static long serialVersionUID
           
 
Constructor Summary
protected JCERSAPrivateKey()
           
(package private) JCERSAPrivateKey(RSAKeyParameters key)
           
(package private) JCERSAPrivateKey(java.security.interfaces.RSAPrivateKey key)
           
(package private) JCERSAPrivateKey(java.security.spec.RSAPrivateKeySpec spec)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getAlgorithm()
           
 DEREncodable getBagAttribute(DERObjectIdentifier oid)
           
 java.util.Enumeration getBagAttributeKeys()
           
 byte[] getEncoded()
           
 java.lang.String getFormat()
           
 java.math.BigInteger getModulus()
           
 java.math.BigInteger getPrivateExponent()
           
 int hashCode()
           
private  void readObject(java.io.ObjectInputStream in)
           
 void setBagAttribute(DERObjectIdentifier oid, DEREncodable attribute)
           
private  void writeObject(java.io.ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

modulus

protected java.math.BigInteger modulus

privateExponent

protected java.math.BigInteger privateExponent

attrCarrier

private PKCS12BagAttributeCarrierImpl attrCarrier
Constructor Detail

JCERSAPrivateKey

protected JCERSAPrivateKey()

JCERSAPrivateKey

JCERSAPrivateKey(RSAKeyParameters key)

JCERSAPrivateKey

JCERSAPrivateKey(java.security.spec.RSAPrivateKeySpec spec)

JCERSAPrivateKey

JCERSAPrivateKey(java.security.interfaces.RSAPrivateKey key)
Method Detail

getModulus

public java.math.BigInteger getModulus()
Specified by:
getModulus in interface java.security.interfaces.RSAKey

getPrivateExponent

public java.math.BigInteger getPrivateExponent()
Specified by:
getPrivateExponent in interface java.security.interfaces.RSAPrivateKey

getAlgorithm

public java.lang.String getAlgorithm()
Specified by:
getAlgorithm in interface java.security.Key

getFormat

public java.lang.String getFormat()
Specified by:
getFormat in interface java.security.Key

getEncoded

public byte[] getEncoded()
Specified by:
getEncoded in interface java.security.Key

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setBagAttribute

public void setBagAttribute(DERObjectIdentifier oid,
                            DEREncodable attribute)
Specified by:
setBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttribute

public DEREncodable getBagAttribute(DERObjectIdentifier oid)
Specified by:
getBagAttribute in interface PKCS12BagAttributeCarrier

getBagAttributeKeys

public java.util.Enumeration getBagAttributeKeys()
Specified by:
getBagAttributeKeys in interface PKCS12BagAttributeCarrier

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException