anon.crypto
Class MyDSAPrivateKey

java.lang.Object
  extended by anon.crypto.AbstractPrivateKey
      extended by anon.crypto.MyDSAPrivateKey
All Implemented Interfaces:
IMyPrivateKey, IXMLEncodable, java.io.Serializable, java.security.interfaces.DSAKey, java.security.interfaces.DSAPrivateKey, java.security.Key, java.security.PrivateKey

public final class MyDSAPrivateKey
extends AbstractPrivateKey
implements java.security.interfaces.DSAPrivateKey, IMyPrivateKey

See Also:
Serialized Form

Field Summary
private  MyDSAParams m_params
           
private  java.math.BigInteger m_X
           
static java.lang.String XML_ELEMENT_NAME
           
 
Fields inherited from interface java.security.interfaces.DSAPrivateKey
serialVersionUID
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION
 
Constructor Summary
MyDSAPrivateKey(org.bouncycastle.crypto.params.DSAPrivateKeyParameters keyParams)
           
MyDSAPrivateKey(org.w3c.dom.Element a_xmlElement)
           
MyDSAPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
           
 
Method Summary
 IMyPublicKey createPublicKey()
          Creates the corresponding public key to this private key.
 java.lang.String getAlgorithm()
           
 org.bouncycastle.asn1.pkcs.PrivateKeyInfo getAsPrivateKeyInfo()
          Gets the private key as a PrivateKeyInfo object.
 java.lang.String getFormat()
           
 MyDSAParams getMyDSAParams()
           
 java.security.interfaces.DSAParams getParams()
           
 org.bouncycastle.crypto.params.DSAPrivateKeyParameters getPrivateParams()
           
 ISignatureCreationAlgorithm getSignatureAlgorithm()
          Gets a signature algorithm object for this key.
 java.math.BigInteger getX()
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          getXmlEncoded
 
Methods inherited from class anon.crypto.AbstractPrivateKey
getEncoded
 
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
 
Methods inherited from interface java.security.Key
getEncoded
 

Field Detail

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
See Also:
Constant Field Values

m_X

private java.math.BigInteger m_X

m_params

private MyDSAParams m_params
Constructor Detail

MyDSAPrivateKey

public MyDSAPrivateKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo privKeyInfo)
                throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

MyDSAPrivateKey

public MyDSAPrivateKey(org.w3c.dom.Element a_xmlElement)
                throws java.security.InvalidKeyException,
                       XMLParseException
Throws:
java.security.InvalidKeyException
XMLParseException

MyDSAPrivateKey

public MyDSAPrivateKey(org.bouncycastle.crypto.params.DSAPrivateKeyParameters keyParams)
Method Detail

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

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

getX

public java.math.BigInteger getX()
Specified by:
getX in interface java.security.interfaces.DSAPrivateKey

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

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

getParams

public java.security.interfaces.DSAParams getParams()
Specified by:
getParams in interface java.security.interfaces.DSAKey

getMyDSAParams

public MyDSAParams getMyDSAParams()

getPrivateParams

public org.bouncycastle.crypto.params.DSAPrivateKeyParameters getPrivateParams()

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
getXmlEncoded

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - an XML document
Returns:
Document