anon.crypto
Class MyRSAPrivateKey
java.lang.Object
anon.crypto.AbstractPrivateKey
anon.crypto.MyRSAPrivateKey
- All Implemented Interfaces:
- IMyPrivateKey, IXMLEncodable, java.io.Serializable, java.security.Key, java.security.PrivateKey
public final class MyRSAPrivateKey
- extends AbstractPrivateKey
- implements IMyPrivateKey
- See Also:
- Serialized Form
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Constructor Summary |
MyRSAPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger dP,
java.math.BigInteger dQ,
java.math.BigInteger qInv)
|
MyRSAPrivateKey(org.bouncycastle.crypto.CipherParameters cipherparams)
|
MyRSAPrivateKey(org.w3c.dom.Element a_xmlElement)
|
MyRSAPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.security.Key |
getEncoded |
XML_ELEMENT_NAME
public static final java.lang.String XML_ELEMENT_NAME
- See Also:
- Constant Field Values
m_algorithm
private MyRSASignature m_algorithm
m_Params
private org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters m_Params
MyRSAPrivateKey
public MyRSAPrivateKey(org.bouncycastle.crypto.CipherParameters cipherparams)
throws java.lang.Exception
- Throws:
java.lang.Exception
MyRSAPrivateKey
public MyRSAPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
throws java.lang.Exception
- Throws:
java.lang.Exception
MyRSAPrivateKey
public MyRSAPrivateKey(org.w3c.dom.Element a_xmlElement)
throws java.lang.Exception
- Throws:
java.lang.Exception
MyRSAPrivateKey
public MyRSAPrivateKey(java.math.BigInteger modulus,
java.math.BigInteger publicExponent,
java.math.BigInteger privateExponent,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger dP,
java.math.BigInteger dQ,
java.math.BigInteger qInv)
throws java.lang.Exception
- Throws:
java.lang.Exception
getSignatureAlgorithm
public ISignatureCreationAlgorithm getSignatureAlgorithm()
- Gets a signature algorithm object for this key.
- Specified by:
getSignatureAlgorithm
in interface IMyPrivateKey
- Returns:
- a signature algorithm object for this key
createPublicKey
public IMyPublicKey createPublicKey()
- Creates the corresponding public key to this private key.
- Specified by:
createPublicKey
in interface IMyPrivateKey
- Returns:
- the corresponding public key to this private key
getParams
public org.bouncycastle.crypto.CipherParameters getParams()
getModulus
public java.math.BigInteger getModulus()
getPrivateExponent
public java.math.BigInteger getPrivateExponent()
getP
public java.math.BigInteger getP()
getQ
public java.math.BigInteger getQ()
getDP
public java.math.BigInteger getDP()
getDQ
public java.math.BigInteger getDQ()
getQInv
public java.math.BigInteger getQInv()
getPublicExponent
public java.math.BigInteger getPublicExponent()
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
getAsPrivateKeyInfo
public org.bouncycastle.asn1.pkcs.PrivateKeyInfo getAsPrivateKeyInfo()
- Description copied from interface:
IMyPrivateKey
- Gets the private key as a PrivateKeyInfo object.
- Specified by:
getAsPrivateKeyInfo
in interface IMyPrivateKey
- Returns:
- the private key as a PrivateKeyInfo object
toXmlElement
public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
- Description copied from interface:
IXMLEncodable
- Return an element that can be appended to the document. This
Method must not change the document in any way!
- Specified by:
toXmlElement
in interface IXMLEncodable
- Parameters:
a_doc
- a document
- Returns:
- the interface as xml element