Package net.corda.v5.crypto.merkle
Interface MerkleTree
-
- All Implemented Interfaces:
@DoNotImplement() public interface MerkleTree
MerkleTrees are cryptographic data structures which can be used to create a short fingerprint of a larger structured dataset. From MerkleTrees, we can create MerkleProofs which let us prove that some particular data is part of the whole tree without revealing the remaining data.
-
-
Method Summary
Modifier and Type Method Description abstract List<Array<byte>>
getLeaves()
Return the input data elements. abstract MerkleTreeHashDigest
getDigest()
Return the MerkleTreeHashDigest used to construct the tree's node and leaf hashes. abstract SecureHash
getRoot()
Return the root element of the tree which is essentially the fingerprint of the whole tree/data set. abstract MerkleProof
createAuditProof(@NotNull() List<Integer> leafIndices)
Creates a MerkleProof for a set of leaves. -
-
Method Detail
-
getLeaves
@NotNull() abstract List<Array<byte>> getLeaves()
Return the input data elements. Usually something deterministically serialized.
-
getDigest
@NotNull() abstract MerkleTreeHashDigest getDigest()
Return the MerkleTreeHashDigest used to construct the tree's node and leaf hashes.
-
getRoot
@NotNull() abstract SecureHash getRoot()
Return the root element of the tree which is essentially the fingerprint of the whole tree/data set.
-
createAuditProof
@NotNull() abstract MerkleProof createAuditProof(@NotNull() List<Integer> leafIndices)
Creates a MerkleProof for a set of leaves.
- Parameters:
leafIndices
- whose leaf's inclusion is to be proven by the proof.
-
-
-
-