com.cedarsoft.utils.crypt.xml
Class XmlSignatureSupport
java.lang.Object
com.cedarsoft.utils.crypt.xml.XmlSignatureSupport
public class XmlSignatureSupport
- extends java.lang.Object
Easy support for xml signatures.
Be carefull! The DocumentBuilderFactory has to be namespace aware
(DocumentBuilderFactory.setNamespaceAware(boolean)).
|
Method Summary |
org.w3c.dom.Document |
getOriginalDocument(org.w3c.dom.Document signedDocument)
|
org.w3c.dom.Node |
getOriginalNode(org.w3c.dom.Document signedDocument)
Returns the node that is the root node of the original signedDocument |
boolean |
hasValidSignature(org.w3c.dom.Document doc)
|
org.w3c.dom.Document |
sign(org.w3c.dom.Document xmlDocument)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlSignatureSupport
public XmlSignatureSupport(@NotNull
X509Support x509Support)
sign
public org.w3c.dom.Document sign(@NotNull
org.w3c.dom.Document xmlDocument)
hasValidSignature
public boolean hasValidSignature(@NotNull
org.w3c.dom.Document doc)
throws java.lang.Exception
- Throws:
java.lang.Exception
getOriginalNode
@NotNull
public org.w3c.dom.Node getOriginalNode(@NotNull
org.w3c.dom.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 org.w3c.dom.Document getOriginalDocument(@NotNull
org.w3c.dom.Document signedDocument)
Copyright © 2009 cedarsoft GmbH. All Rights Reserved.