Package org.bouncycastle.tsp.ers
Class ERSDataGroup
java.lang.Object
org.bouncycastle.tsp.ers.ERSCachingData
org.bouncycastle.tsp.ers.ERSDataGroup
- All Implemented Interfaces:
ERSData
- Direct Known Subclasses:
ERSDirectoryDataGroup
Representation of data groups with more than 1 members according to the description provided in RFC4998.
Such data groups represent a set of one or more data objects (e.g. electronic documents) for which an Evidence Record should be generated. Data groups will be encapsulated in a single PartialHashtree so that the presence of the group can be checked for, as well as the individual items that make it up.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionERSDataGroup
(List<ERSData> dataObjects) Base constructor using a list of data objects.ERSDataGroup
(ERSData dataObject) Constructor for a group with a single object.ERSDataGroup
(ERSData... dataObjects) Base constructor for an "array" of data objects. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
calculateHash
(DigestCalculator digestCalculator) Generates a hash for the whole DataGroup.List<byte[]>
getHashes
(DigestCalculator digestCalculator) Generates hashes for all the data objects included in the data group.int
size()
Return the number of data objects present in the group.Methods inherited from class org.bouncycastle.tsp.ers.ERSCachingData
getHash
-
Field Details
-
dataObjects
-
-
Constructor Details
-
ERSDataGroup
Base constructor for an "array" of data objects.- Parameters:
dataObjects
- an array of data objects.
-
ERSDataGroup
Base constructor using a list of data objects.- Parameters:
dataObjects
- a list of data objects.
-
ERSDataGroup
Constructor for a group with a single object.- Parameters:
dataObject
- the data object to go in the group.
-
-
Method Details
-
getHashes
Generates hashes for all the data objects included in the data group.- Parameters:
digestCalculator
- theDigestCalculator
to use for computing the hashes- Returns:
- the set of hashes, in ascending order
-
calculateHash
Generates a hash for the whole DataGroup.- Specified by:
calculateHash
in classERSCachingData
- Parameters:
digestCalculator
- theDigestCalculator
to use for computing the hash- Returns:
- a hash that is representative of the whole DataGroup
-
size
public int size()Return the number of data objects present in the group.- Returns:
- membership count of the group.
-