Package org.bouncycastle.tsp.ers
Class BinaryTreeRootCalculator
- java.lang.Object
-
- org.bouncycastle.tsp.ers.BinaryTreeRootCalculator
-
- All Implemented Interfaces:
ERSRootNodeCalculator
public class BinaryTreeRootCalculator extends Object implements ERSRootNodeCalculator
Calculator based on the use of a left weighted binary Merkle tree created on top of the partial hash tree objects provided.
-
-
Constructor Summary
Constructors Constructor Description BinaryTreeRootCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
computeRootHash(DigestCalculator digCalc, org.bouncycastle.asn1.tsp.PartialHashtree[] nodes)
Calculate the root hash of the Merkle tree from the partial hash-tree nodes.
-
-
-
Method Detail
-
computeRootHash
public byte[] computeRootHash(DigestCalculator digCalc, org.bouncycastle.asn1.tsp.PartialHashtree[] nodes)
Description copied from interface:ERSRootNodeCalculator
Calculate the root hash of the Merkle tree from the partial hash-tree nodes.- Specified by:
computeRootHash
in interfaceERSRootNodeCalculator
- Parameters:
digCalc
- the digest calculator to use.nodes
- the partial hash-trees forming the basis of the Merkle tree.- Returns:
- the root hash of the Merkle tree.
-
-