anon.crypto
Class MyDSAPrivateKey
java.lang.Object
anon.crypto.AbstractPrivateKey
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
Fields inherited from interface java.security.interfaces.DSAPrivateKey |
serialVersionUID |
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_X
private java.math.BigInteger m_X
m_params
private MyDSAParams m_params
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)
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