org.apache.jcp.xml.dsig.internal.dom
Class DOMXMLSignature.DOMSignatureValue

java.lang.Object
  extended by org.apache.jcp.xml.dsig.internal.dom.BaseStructure
      extended by org.apache.jcp.xml.dsig.internal.dom.DOMStructure
          extended by org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature.DOMSignatureValue
All Implemented Interfaces:
XMLSignature.SignatureValue, XMLStructure
Enclosing class:
DOMXMLSignature

public class DOMXMLSignature.DOMSignatureValue
extends DOMStructure
implements XMLSignature.SignatureValue


Method Summary
 boolean equals(Object o)
           
 String getEncodedValue()
           
 String getId()
          Returns the optional Id attribute of this SignatureValue, which permits this element to be referenced from elsewhere.
 byte[] getValue()
          Returns the signature value of this SignatureValue.
 int hashCode()
           
 void marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context)
           
 boolean validate(XMLValidateContext validateContext)
          Validates the signature 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
 

Method Detail

getId

public String getId()
Description copied from interface: XMLSignature.SignatureValue
Returns the optional Id attribute of this SignatureValue, which permits this element to be referenced from elsewhere.

Specified by:
getId in interface XMLSignature.SignatureValue
Returns:
the Id attribute (may be null if not specified)

getValue

public byte[] getValue()
Description copied from interface: XMLSignature.SignatureValue
Returns the signature value of this SignatureValue.

Specified by:
getValue in interface XMLSignature.SignatureValue
Returns:
the signature value (may be null if the XMLSignature has not been signed yet). Each invocation of this method returns a new clone of the array to prevent subsequent modification.

getEncodedValue

public String getEncodedValue()

validate

public boolean validate(XMLValidateContext validateContext)
                 throws XMLSignatureException
Description copied from interface: XMLSignature.SignatureValue
Validates the signature value. This method performs a cryptographic validation of the signature calculated over the SignedInfo of the XMLSignature.

This method only validates the signature the first time it is invoked. On subsequent invocations, it returns a cached result.

Specified by:
validate in interface XMLSignature.SignatureValue
Parameters:
validateContext - the validating context
Returns:
true if the signature was validated successfully; false otherwise
Throws:
XMLSignatureException - if an unexpected exception occurs while validating the signature

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

marshal

public void marshal(XmlWriter xwriter,
                    String dsPrefix,
                    XMLCryptoContext context)
             throws MarshalException
Specified by:
marshal in class DOMStructure
Throws:
MarshalException


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