@Beta public class MerkleProof extends Object
Constructor and Description |
---|
MerkleProof(ProtocolVersion version,
Map<Integer,String> knownLeaves,
Map<Integer,String> knownSalts,
Map<String,String> knownHashes,
int numberOfLeaves)
creates a MerkleProof, assuming the SHA-256 hashing algorithm
|
MerkleProof(ProtocolVersion version,
Map<Integer,String> knownLeaves,
Map<Integer,String> knownSalts,
Map<String,String> knownHashes,
int numberOfLeaves,
String hashAlgorithm)
creates a MerkleProof
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getHashAlgorithm() |
Map<String,String> |
getKnownHashes() |
Map<Integer,String> |
getKnownLeaves() |
Map<Integer,String> |
getKnownSalts() |
int |
getNumberOfLeaves() |
ProtocolVersion |
getProtocolVersion() |
int |
hashCode() |
public MerkleProof(@Nullable ProtocolVersion version, @Nonnull Map<Integer,String> knownLeaves, @Nonnull Map<Integer,String> knownSalts, @Nonnull Map<String,String> knownHashes, int numberOfLeaves)
version
- ProtocolVersion
defines how the merkle proof was builtknownLeaves
- Map<Integer, String>
all known leaves of the merkle tree, maps the position of the leaf to the
actual valueknownSalts
- Map<Integer, String>
all salts for the known leaves of the merkle tree. Keys of this map must
match the keys in the knownLeavesknownHashes
- Map<String, String>
all hashes which are needed to build a full merkle tree with the given
known leaves and saltsnumberOfLeaves
- number of all leaves in the treepublic MerkleProof(@Nullable ProtocolVersion version, @Nonnull Map<Integer,String> knownLeaves, @Nonnull Map<Integer,String> knownSalts, @Nonnull Map<String,String> knownHashes, int numberOfLeaves, @Nullable String hashAlgorithm)
version
- ProtocolVersion
defines how the merkle proof was builtknownLeaves
- Map<Integer, String>
all known leaves of the merkle tree, maps the position of the leaf to the
actual valueknownSalts
- Map<Integer, String>
all salts for the known leaves of the merkle tree. Keys of this map must
match the keys in the knownLeavesknownHashes
- Map<String, String>
all hashes which are needed to build a full merkle tree with the given
known leaves and saltsnumberOfLeaves
- number of all leaves in the treehashAlgorithm
- the hash algorithm which is used to generate the hashes@Nullable public ProtocolVersion getProtocolVersion()
public int getNumberOfLeaves()
Copyright © 2021 SAP SE. All rights reserved.