Package xades4j.production
Class Enveloped
java.lang.Object
xades4j.production.Enveloped
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
ConstructorsConstructorDescriptionEnveloped
(XadesSigner signer) Creates a new instance based on the givenXadesSigner
. -
Method Summary
-
Constructor Details
-
Enveloped
Creates a new instance based on the givenXadesSigner
.- Parameters:
signer
- the signer to be used by the resulting instance
-
-
Method Details
-
sign
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
- seeXadesSigner.sign(xades4j.production.SignedDataObjects, org.w3c.dom.Node)
IllegalArgumentException
- ifelementToSign
doesn't have an Id and isn't the document root
-