org.apache.xml.security.keys.content.x509
Class XMLX509Digest

java.lang.Object
  extended by org.apache.xml.security.utils.ElementProxy
      extended by org.apache.xml.security.utils.Signature11ElementProxy
          extended by org.apache.xml.security.keys.content.x509.XMLX509Digest
All Implemented Interfaces:
XMLX509DataContent

public class XMLX509Digest
extends Signature11ElementProxy
implements XMLX509DataContent

Provides content model support for the dsig11:X509Digest element.

Author:
Brent Putman (putmanb@georgetown.edu)

Field Summary
 
Fields inherited from class org.apache.xml.security.utils.ElementProxy
baseURI, log
 
Constructor Summary
XMLX509Digest(Document doc, byte[] digestBytes, String algorithmURI)
          Constructor XMLX509Digest
XMLX509Digest(Document doc, X509Certificate x509certificate, String algorithmURI)
          Constructor XMLX509Digest
XMLX509Digest(Element element, String BaseURI)
          Constructor XMLX509Digest
 
Method Summary
 String getAlgorithm()
          Method getAlgorithm
 Attr getAlgorithmAttr()
          Method getAlgorithmAttr
 String getBaseLocalName()
          Returns the localname of the Elements of the sub-class.
 byte[] getDigestBytes()
          Method getDigestBytes
static byte[] getDigestBytesFromCert(X509Certificate cert, String algorithmURI)
          Method getDigestBytesFromCert
 
Methods inherited from class org.apache.xml.security.utils.Signature11ElementProxy
getBaseNamespace
 
Methods inherited from class org.apache.xml.security.utils.ElementProxy
addBase64Element, addBase64Text, addBigIntegerElement, addReturnToSelf, addText, addTextElement, appendOther, appendSelf, appendSelf, createElementForFamily, createElementForFamilyLocal, createText, getBaseURI, getBigIntegerFromChildElement, getBytesFromTextChild, getDefaultPrefix, getDocument, getElement, getElementPlusReturns, getFirstChild, getLocalAttribute, getTextFromChildElement, getTextFromTextChild, length, registerDefaultPrefixes, setDefaultPrefix, setDocument, setElement, setElement, setLocalAttribute, setLocalIdAttribute, setXPathNamespaceContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLX509Digest

public XMLX509Digest(Element element,
                     String BaseURI)
              throws XMLSecurityException
Constructor XMLX509Digest

Parameters:
element -
BaseURI -
Throws:
XMLSecurityException

XMLX509Digest

public XMLX509Digest(Document doc,
                     byte[] digestBytes,
                     String algorithmURI)
Constructor XMLX509Digest

Parameters:
doc -
digestBytes -
algorithmURI -

XMLX509Digest

public XMLX509Digest(Document doc,
                     X509Certificate x509certificate,
                     String algorithmURI)
              throws XMLSecurityException
Constructor XMLX509Digest

Parameters:
doc -
x509certificate -
algorithmURI -
Throws:
XMLSecurityException
Method Detail

getAlgorithmAttr

public Attr getAlgorithmAttr()
Method getAlgorithmAttr

Returns:
the Algorithm attribute

getAlgorithm

public String getAlgorithm()
Method getAlgorithm

Returns:
Algorithm string

getDigestBytes

public byte[] getDigestBytes()
                      throws XMLSecurityException
Method getDigestBytes

Returns:
the digestbytes
Throws:
XMLSecurityException

getDigestBytesFromCert

public static byte[] getDigestBytesFromCert(X509Certificate cert,
                                            String algorithmURI)
                                     throws XMLSecurityException
Method getDigestBytesFromCert

Parameters:
cert -
algorithmURI -
Returns:
digest bytes from the given certificate
Throws:
XMLSecurityException

getBaseLocalName

public String getBaseLocalName()
Description copied from class: ElementProxy
Returns the localname of the Elements of the sub-class.

Specified by:
getBaseLocalName in class ElementProxy
Returns:
the localname of the Elements of the sub-class.


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