com.cedarsoft.crypt.xml
Class XmlSignatureSupport

java.lang.Object
  extended by com.cedarsoft.crypt.xml.XmlSignatureSupport

public class XmlSignatureSupport
extends Object

Easy support for xml signatures. Be carefull! The DocumentBuilderFactory has to be namespace aware (DocumentBuilderFactory.setNamespaceAware(boolean)).


Constructor Summary
XmlSignatureSupport(X509Support x509Support)
           
 
Method Summary
 Document getOriginalDocument(Document signedDocument)
           
 Node getOriginalNode(Document signedDocument)
          Returns the node that is the root node of the original signedDocument
 boolean hasValidSignature(Document doc)
           
 Document sign(Document xmlDocument)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSignatureSupport

@Inject
public XmlSignatureSupport(@NotNull
                                  X509Support x509Support)
Method Detail

sign

public Document sign(@NotNull
                     Document xmlDocument)

hasValidSignature

public boolean hasValidSignature(@NotNull
                                 Document doc)
                          throws Exception
Throws:
Exception

getOriginalNode

@NotNull
public Node getOriginalNode(@NotNull
                                    Document signedDocument)
Returns the node that is the root node of the original signedDocument

Parameters:
signedDocument - the signed signedDocument
Returns:
the root node of the original signedDocument

getOriginalDocument

@NotNull
public Document getOriginalDocument(@NotNull
                                            Document signedDocument)


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.