@Beta public class V110MerkleTree extends AbstractMerkleTree
depth, leaves, messageDigest, nodes, numberOfLeaves, salts
ROOT_HASH_KEY
Modifier | Constructor and Description |
---|---|
protected |
V110MerkleTree(MessageDigest messageDigest,
int numberOfLeaves)
Constructor
|
protected |
V110MerkleTree(MessageDigest messageDigest,
Map<Integer,String> leaves,
Map<Integer,String> salts)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateHash(String key)
calculates the hash of given rootHashKey
|
protected String |
calculatLeafHash(String value)
calculates the hash of the leaf
|
ProtocolVersion |
getProtocolVersion()
Protocol version describes how to build the tree and the proof
|
bytesToHexString, calculateDepth, createEmptyTree, formatKey, generateLeftChildKey, generateRightChildKey, getHashAlgorithm, getLeaves, getMissingHashIndexes, getNodes, getNumberOfLeaves, getRootHash, getSalts, getValueByKey, isALeafKey, removeRedundantNodes, setLeavesHashes
protected V110MerkleTree(MessageDigest messageDigest, Map<Integer,String> leaves, Map<Integer,String> salts)
messageDigest
- messageDigestleaves
- leaves of the tree, index mapped to the valuesalts
- salts, mapping from index of the leave to the saltprotected V110MerkleTree(MessageDigest messageDigest, int numberOfLeaves)
messageDigest
- messageDigestnumberOfLeaves
- number of leaves in the treeprotected String calculatLeafHash(String value)
AbstractMerkleTree
calculatLeafHash
in class AbstractMerkleTree
value
- key of the leafprotected void calculateHash(String key)
AbstractMerkleTree
calculateHash
in class AbstractMerkleTree
key
- rootHashKey@Nonnull public ProtocolVersion getProtocolVersion()
MerkleTree
ProtocolVersion
protocolVersionCopyright © 2021 SAP SE. All rights reserved.