Package xades4j.utils
Interface TimeStampDigestInput
public interface TimeStampDigestInput
Builder of inputs for time-stamps. The digests for time-stamps are usually
calculated over a concatenations of byte-streams, resulting from nodes and/or
Reference
s (processed or not), with the proper canonicalization if needed.
This interface provides methods to build a sequential input by adding DOM Node
s
or Reference
s.- Author:
- Luís
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aNode
to the input.void
addReference
(org.apache.xml.security.signature.Reference r) Adds aReference
to the input.byte[]
getBytes()
Gets the octet-stream corresponding to the actual state of the input.
-
Method Details
-
addReference
void addReference(org.apache.xml.security.signature.Reference r) throws CannotAddDataToDigestInputException Adds aReference
to the input. It is processed and the result is canonicalized if it is a node-set.- Parameters:
r
- the reference to be added- Throws:
CannotAddDataToDigestInputException
- if there is an error adding the referenceNullPointerException
- ifr
isnull
-
addNode
Adds aNode
to the input. The node is canonicalized.- Parameters:
n
- the node to be added- Throws:
CannotAddDataToDigestInputException
- if there is an error adding the nodeNullPointerException
- ifn
isnull
-
getBytes
byte[] getBytes()Gets the octet-stream corresponding to the actual state of the input.- Returns:
- the octet-stream (always a new instance)
-