anon.pay.xml
Class XMLJapPublicKey

java.lang.Object
  extended by anon.pay.xml.XMLJapPublicKey
All Implemented Interfaces:
IXMLEncodable

public class XMLJapPublicKey
extends java.lang.Object
implements IXMLEncodable

This class handles RSA and DSA Public Keys represented in XML. It is used mainly for formatting and parsing xml keys The corresponding XML struct is as follows (for RSA): Base64 encoded Modulus Base 64 enocded Exponent


Field Summary
private  IMyPublicKey m_publicKey
           
private static java.lang.String ms_elemName
           
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
XMLJapPublicKey(byte[] data)
           
XMLJapPublicKey(char[] data)
           
XMLJapPublicKey(org.w3c.dom.Element elemKey)
           
XMLJapPublicKey(IMyPublicKey key)
           
XMLJapPublicKey(java.lang.String data)
           
 
Method Summary
 boolean equals(XMLJapPublicKey k)
           
 IMyPublicKey getPublicKey()
           
static java.lang.String getXMLElementName()
           
private  void setPubKey(org.w3c.dom.Element elemKey)
          Parses an XML JapPublicKey structure.
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Return an element that can be appended to the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_publicKey

private IMyPublicKey m_publicKey

ms_elemName

private static java.lang.String ms_elemName
Constructor Detail

XMLJapPublicKey

public XMLJapPublicKey(IMyPublicKey key)

XMLJapPublicKey

public XMLJapPublicKey(byte[] data)
                throws java.lang.Exception
Throws:
java.lang.Exception

XMLJapPublicKey

public XMLJapPublicKey(char[] data)
                throws java.lang.Exception
Throws:
java.lang.Exception

XMLJapPublicKey

public XMLJapPublicKey(java.lang.String data)
                throws XMLParseException
Throws:
XMLParseException

XMLJapPublicKey

public XMLJapPublicKey(org.w3c.dom.Element elemKey)
                throws XMLParseException
Throws:
XMLParseException
Method Detail

getXMLElementName

public static java.lang.String getXMLElementName()

getPublicKey

public IMyPublicKey getPublicKey()

setPubKey

private void setPubKey(org.w3c.dom.Element elemKey)
                throws XMLParseException
Parses an XML JapPublicKey structure. Can handle RSA and DSA keys.

Parameters:
elemKey - Element the "JapPublicKey" tag
Throws:
java.lang.Exception
XMLParseException

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

equals

public boolean equals(XMLJapPublicKey k)