org.jcp.xml.dsig.internal.dom
Class DOMKeyValue

java.lang.Object
  extended by org.jcp.xml.dsig.internal.dom.DOMStructure
      extended by org.jcp.xml.dsig.internal.dom.DOMKeyValue
All Implemented Interfaces:
KeyValue, XMLStructure

public final class DOMKeyValue
extends DOMStructure
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(org.w3c.dom.Element kvElem)
          Creates a DOMKeyValue from an element.
DOMKeyValue(java.security.PublicKey key)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.security.PublicKey getPublicKey()
          Returns the public key of this KeyValue.
 int hashCode()
           
 void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, DOMCryptoContext context)
           
 
Methods inherited from class org.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
 
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(java.security.PublicKey key)
            throws java.security.KeyException
Throws:
java.security.KeyException

DOMKeyValue

public DOMKeyValue(org.w3c.dom.Element kvElem)
            throws MarshalException
Creates a DOMKeyValue from an element.

Parameters:
kvElem - a KeyValue element
Throws:
MarshalException
Method Detail

getPublicKey

public java.security.PublicKey getPublicKey()
                                     throws java.security.KeyException
Description copied from interface: KeyValue
Returns the public key of this KeyValue.

Specified by:
getPublicKey in interface KeyValue
Returns:
the public key of this KeyValue
Throws:
java.security.KeyException - if this KeyValue cannot be converted to a PublicKey

marshal

public void marshal(org.w3c.dom.Node parent,
                    java.lang.String dsPrefix,
                    DOMCryptoContext context)
             throws MarshalException
Specified by:
marshal in class DOMStructure
Throws:
MarshalException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2000-2014 The Apache Software Foundation. All Rights Reserved.