xades4j.production
Class Enveloped
java.lang.Object
xades4j.production.Enveloped
public class Enveloped
- extends Object
Utility class to create enveloped signature. Enveloped signatures are ones whose
Signature element is child of the resource being signed. An appropriate
transform has to be used in these scenarios to exclude the signature element from
its own processing. This class is just an helper for those situations.
- Author:
- Luís
|
Constructor Summary |
Enveloped(XadesSigner signer)
Creates a new instance based on the given XadesSigner. |
|
Method Summary |
void |
sign(Element elementToSign)
Creates an enveloped signature over an element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Enveloped
public Enveloped(XadesSigner signer)
- Creates a new instance based on the given
XadesSigner.
- Parameters:
signer - the signer to be used by the resulting instance
sign
public void sign(Element elementToSign)
throws XAdES4jException
- Creates an enveloped signature over an element. The element must have an
Id or be the document root if it doesn't. In the last case an empty (URI="")
reference is used.
- Parameters:
elementToSign - the element that will be signed and will be the signature's parent
- Throws:
XAdES4jException - see XadesSigner.sign(xades4j.production.SignedDataObjects, org.w3c.dom.Node)
IllegalArgumentException - if elementToSign doesn't have an Id and isn't the document root
Copyright © 2012. All Rights Reserved.