org.apache.jcp.xml.dsig.internal.dom
Class DOMKeyValue<K extends PublicKey>

java.lang.Object
  extended by org.apache.jcp.xml.dsig.internal.dom.BaseStructure
      extended by org.apache.jcp.xml.dsig.internal.dom.DOMKeyValue<K>
All Implemented Interfaces:
KeyValue, XMLStructure

public abstract class DOMKeyValue<K extends PublicKey>
extends BaseStructure
implements KeyValue

DOM-based implementation of KeyValue.

Author:
Sean Mullan

Field Summary
 
Fields inherited from interface javax.xml.crypto.dsig.keyinfo.KeyValue
DSA_TYPE, RSA_TYPE
 
Constructor Summary
DOMKeyValue(Element kvtElem)
          Creates a DOMKeyValue from an element.
DOMKeyValue(K key)
           
 
Method Summary
static BigInteger decode(Element elem)
           
 boolean equals(Object obj)
           
 PublicKey getPublicKey()
           
 int hashCode()
           
static void marshal(XmlWriter xwriter, BigInteger bigNum)
           
 void marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context)
           
static void writeBase64BigIntegerElement(XmlWriter xwriter, String prefix, String localName, String namespaceURI, BigInteger value)
           
 
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 

Constructor Detail

DOMKeyValue

public DOMKeyValue(K key)
            throws KeyException
Throws:
KeyException

DOMKeyValue

public DOMKeyValue(Element kvtElem)
            throws MarshalException
Creates a DOMKeyValue from an element.

Parameters:
kvtElem - a KeyValue child element
Throws:
MarshalException
Method Detail

getPublicKey

public PublicKey getPublicKey()
                       throws KeyException
Specified by:
getPublicKey in interface KeyValue
Throws:
KeyException

marshal

public void marshal(XmlWriter xwriter,
                    String dsPrefix,
                    XMLCryptoContext context)
             throws MarshalException
Throws:
MarshalException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

decode

public static BigInteger decode(Element elem)
                         throws MarshalException
Throws:
MarshalException

writeBase64BigIntegerElement

public static void writeBase64BigIntegerElement(XmlWriter xwriter,
                                                String prefix,
                                                String localName,
                                                String namespaceURI,
                                                BigInteger value)

marshal

public static void marshal(XmlWriter xwriter,
                           BigInteger bigNum)

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.