Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- AbstractNode - Class in io.crums.util.mrkl.index
-
Breadth-first coordinates of a node in a Merkle tree.
- AbstractNode(int, int) - Constructor for class io.crums.util.mrkl.index.AbstractNode
-
Base constructor.
- add(byte[]) - Method in class io.crums.util.mrkl.Builder
-
Adds the specified item as the next leaf node are returns its leaf index.
- add(byte[], int, int) - Method in class io.crums.util.mrkl.Builder
-
Adds the specified item as the next leaf node are returns its leaf index.
- add(byte[], int, int) - Method in class io.crums.util.mrkl.DeltaBuilder
-
Items only the width of the (hash) digest width are allowed because this is an omni-width tree.
- add(byte[], int, int) - Method in class io.crums.util.mrkl.FixedLeafBuilder
- appendToStringDetail(StringBuilder) - Method in class io.crums.util.mrkl.Tree
B
- BRANCH_PAD - Static variable in class io.crums.util.mrkl.Tree
- build() - Method in class io.crums.util.mrkl.Builder
-
Builds and returns the tree.
- build() - Method in class io.crums.util.mrkl.DeltaBuilder
- build() - Method in class io.crums.util.mrkl.FixedLeafBuilder
- Builder - Class in io.crums.util.mrkl
-
Collects items (byte arrays) and builds a Merkle tree.
- Builder(Builder) - Constructor for class io.crums.util.mrkl.Builder
-
Copy constructor.
- Builder(String) - Constructor for class io.crums.util.mrkl.Builder
-
Creates a new copy-on-write (copy-on-add) instance with a dedicated
MessageDigestusing the given hashing algorithm. - Builder(String, boolean) - Constructor for class io.crums.util.mrkl.Builder
-
Creates a new instance with a dedicated
MessageDigestusing the given hashing algorithm.
C
- chain() - Method in class io.crums.util.mrkl.Proof
-
Returns the hash chain.
- chainLength(int, int) - Static method in class io.crums.util.mrkl.Proof
-
Returns the chain length.
- clear() - Method in class io.crums.util.mrkl.Builder
-
Clears the state of the instance, as if new.
- clear() - Method in class io.crums.util.mrkl.DeltaBuilder
- completeTree() - Method in class io.crums.util.mrkl.Builder
- computeNewLeafCount(Tree, byte[]) - Static method in class io.crums.util.mrkl.DeltaTree
-
Infers and returns the number of leaves in the new tree given an array of deltas (additions) from a base tree.
- copyOnWrite - Variable in class io.crums.util.mrkl.Builder
- count() - Method in class io.crums.util.mrkl.Builder
-
Returns the number of items added.
- count() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the number leaf nodes (data items) in the tree.
- count(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the number of nodes at the given
level. - countSansCarry(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the numbern of nodes at the given
levelexcluding the carry (if it has one).
D
- data - Variable in class io.crums.util.mrkl.Builder
-
Breadth-first view of the nodes' data.
- data() - Method in class io.crums.util.mrkl.Node
-
Returns a copy of the node's data.
- data(int) - Method in class io.crums.util.mrkl.FreeLeafTree
- data(int, int) - Method in class io.crums.util.mrkl.DeltaTree
- data(int, int) - Method in class io.crums.util.mrkl.FixedLeafTree
- data(int, int) - Method in class io.crums.util.mrkl.FreeLeafTree
- data(int, int) - Method in class io.crums.util.mrkl.Tree
-
Returns [a copy of] the data for the node at the specified coordinates.
- dataBlock() - Method in class io.crums.util.mrkl.FixedLeafTree
-
Returns entire data block.
- DeltaBuilder - Class in io.crums.util.mrkl
-
Builds an incrementally bigger tree by only recalculating and maintaining deltas.
- DeltaBuilder(Tree) - Constructor for class io.crums.util.mrkl.DeltaBuilder
-
Constructs a copy-on-write instance.
- DeltaBuilder(Tree, boolean) - Constructor for class io.crums.util.mrkl.DeltaBuilder
-
Creates a new instance.
- DeltaTree - Class in io.crums.util.mrkl
-
A Merkle tree constructed from another with more leaves appended.
- DeltaTree(DeltaTree) - Constructor for class io.crums.util.mrkl.DeltaTree
-
Copy constructor.
- DeltaTree(Tree, byte[]) - Constructor for class io.crums.util.mrkl.DeltaTree
-
Creates a new instance.
- digest - Variable in class io.crums.util.mrkl.Builder
E
- equals(Object) - Method in class io.crums.util.mrkl.index.AbstractNode
-
Equality semantics are governed by coordinates and handedness.
- equals(Object) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines whether an instance is structurally equivalent to another.
- equals(Object) - Method in class io.crums.util.mrkl.Proof
- extraBlock() - Method in class io.crums.util.mrkl.FixedLeafTree
-
Returns the data beyond the standard definition of the tree.
F
- FACTORY - Static variable in class io.crums.util.mrkl.index.AbstractNode
-
Stateless factory for "index" of instances of this class with no additional data.
- fitsModelCapacity(int, int, int) - Static method in class io.crums.util.mrkl.FixedLeafTree
- FixedLeafBuilder - Class in io.crums.util.mrkl
-
Builds FixedLeafTree instances.
- FixedLeafBuilder(FixedLeafBuilder) - Constructor for class io.crums.util.mrkl.FixedLeafBuilder
- FixedLeafBuilder(String) - Constructor for class io.crums.util.mrkl.FixedLeafBuilder
- FixedLeafBuilder(String, boolean) - Constructor for class io.crums.util.mrkl.FixedLeafBuilder
- FixedLeafBuilder(String, int) - Constructor for class io.crums.util.mrkl.FixedLeafBuilder
- FixedLeafBuilder(String, int, boolean) - Constructor for class io.crums.util.mrkl.FixedLeafBuilder
- FixedLeafTree - Class in io.crums.util.mrkl
-
A more compact
Treeappropriate if the leaves are fixed-width and it'all fits under 2 gigabytes. - FixedLeafTree(int, String, byte[], int, int) - Constructor for class io.crums.util.mrkl.FixedLeafTree
-
Creates a new instance.
- FixedLeafTree(FixedLeafTree) - Constructor for class io.crums.util.mrkl.FixedLeafTree
-
Copy constructor.
- FreeLeafTree - Class in io.crums.util.mrkl
-
A
Treeallowing variable length leaves. - FreeLeafTree(byte[][], int, String) - Constructor for class io.crums.util.mrkl.FreeLeafTree
-
Creates a new instance.
- FreeLeafTree(byte[][], int, String, boolean) - Constructor for class io.crums.util.mrkl.FreeLeafTree
-
Creates a new instance.
- funnel() - Method in class io.crums.util.mrkl.Proof
-
Returns the proof's funnel.
- funnelLength(int, int) - Static method in class io.crums.util.mrkl.Proof
-
Returns the funnel length.
G
- getFrontier() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the frontier nodes.
- getHashAlgo() - Method in class io.crums.util.mrkl.Builder
- getHashAlgo() - Method in class io.crums.util.mrkl.Proof
- getHashAlgo() - Method in class io.crums.util.mrkl.Tree
-
Returns the hashing algorithm that the tree's internal nodes use.
- getLeaf(int) - Method in class io.crums.util.mrkl.Node
-
Returns the leaf node at the given
index. - getLeftChild(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the left child of the internal node at the given coordinates.
- getLeftChild(AbstractNode) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the left child of the given parent node.
- getNode(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the node at the given serial index.
- getNode(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the node at the given coordinates.
- getParent(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the parent of the node at the given coordinates.
- getParent(AbstractNode) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the given node's parent.
- getRightChild(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the right child of the internal node at the given coordinates.
- getRightChild(AbstractNode) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the right child of the given parent node.
- getRoot() - Method in class io.crums.util.mrkl.Node
-
Returns the root of the tree.
- getSibling(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the sibling of the node at the given coordinates.
- getSibling(AbstractNode) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the given node's sibling.
H
- hasCarry(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines whether the last node is a carry.
- hash() - Method in class io.crums.util.mrkl.Tree
-
Returns the hash of the root of the tree.
- hash(byte[]) - Method in class io.crums.util.mrkl.Builder
-
Convenience method to hash using this instance's digest algo.
- hashAlgoWidth() - Method in class io.crums.util.mrkl.Tree
-
Returns the byte width of the hashing algorithm by observing the width of the node at coordinates (1, 0), which is the first internal node constructed in a tree.
- hashChain() - Method in class io.crums.util.mrkl.Proof
-
Returns the hash chain.
- hashCode() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Consistent with AbstractNode.equals(Object).
- hashCode() - Method in class io.crums.util.mrkl.index.TreeIndex
-
The instance's hash code is just the number of its leaves.
- hashCode() - Method in class io.crums.util.mrkl.Proof
- hashInternals(byte[], byte[], MessageDigest) - Static method in class io.crums.util.mrkl.Tree
- hashInternals(ByteBuffer, ByteBuffer, MessageDigest) - Static method in class io.crums.util.mrkl.Tree
-
Computes and returns the hash of the given merkle nodes.
- hashLeaves(byte[], byte[], MessageDigest) - Static method in class io.crums.util.mrkl.Tree
- hashLeaves(ByteBuffer, ByteBuffer, MessageDigest) - Static method in class io.crums.util.mrkl.Tree
-
Computes and returns the hash of the given leaf nodes.
- hashUncommon(byte[], byte[], MessageDigest) - Static method in class io.crums.util.mrkl.Tree
-
Computes and returns the hash of the given merkle nodes.
- hashUncommon(ByteBuffer, ByteBuffer, MessageDigest) - Static method in class io.crums.util.mrkl.Tree
-
Computes and returns the hash of the given merkle nodes.
- hashWidth() - Method in class io.crums.util.mrkl.Builder
- hashWidth() - Method in class io.crums.util.mrkl.FixedLeafTree
- height() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the height of the root of the tree relative to its base (the leaves).
I
- idx() - Method in class io.crums.util.mrkl.Tree
-
Returns the random access index into tree structure.
- index() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Returns this node's index (at this level).
- init(TreeIndex<N>) - Method in interface io.crums.util.mrkl.index.TreeIndex.NodeFactory
-
Optional initialization.
- io.crums.util.mrkl - module io.crums.util.mrkl
- io.crums.util.mrkl - package io.crums.util.mrkl
- io.crums.util.mrkl.index - package io.crums.util.mrkl.index
- isCarry() - Method in class io.crums.util.mrkl.Node
-
Determines if the node is a carry.
- isCarry(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines whether node at the given coordinates is a carry.
- isLeaf() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Determines whether this node is at level zero.
- isLeafWidthFixed() - Method in class io.crums.util.mrkl.Tree
-
Determines whether the width of the leaves is fixed.
- isLeft() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Determines whether this node is the left child of its parent.
- isLeft(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines if the node at the given coordinates is the left child of its parent node.
- isOmniWidth() - Method in class io.crums.util.mrkl.Tree
-
Determines whether the width of the leaves is the same as the byte width of the hashing algorithm.
- isRight() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Determines whether this node is the right child of its parent.
- isRight() - Method in class io.crums.util.mrkl.Node
- isRight(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines if the node at the given coordinates is the right child of its parent node.
- isRoot() - Method in class io.crums.util.mrkl.Node
- isRoot(AbstractNode) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines whether the given node is this tree's root node.
- item() - Method in class io.crums.util.mrkl.Proof
-
Returns [a copy of] the item proven.
- item(int) - Method in class io.crums.util.mrkl.Builder
-
Returns (a copy of) of the item at the given
index. - itemsAdded() - Method in class io.crums.util.mrkl.DeltaBuilder
-
Returns the total number of items added (appended).
L
- LEAF_PAD - Static variable in class io.crums.util.mrkl.Tree
- leafCount() - Method in class io.crums.util.mrkl.Node
-
Returns the total number of leaves in the tree this node belongs to.
- leafCount() - Method in class io.crums.util.mrkl.Proof
-
Returns the total number of leaves in the tree from which this proof was constructed.
- leafIndex() - Method in class io.crums.util.mrkl.Proof
-
The [leaf] index of the item proven.
- leafWidth() - Method in class io.crums.util.mrkl.Builder
-
Returns the leaf width if fixed; -1 if variable; -2 if not set.
- leafWidth() - Method in class io.crums.util.mrkl.DeltaTree
- leafWidth() - Method in class io.crums.util.mrkl.FixedLeafBuilder
- leafWidth() - Method in class io.crums.util.mrkl.FixedLeafTree
-
Returns the fixed-size leaf width.
- leafWidth() - Method in class io.crums.util.mrkl.FreeLeafTree
-
Returns -1 signifying variable width.
- leafWidth() - Method in class io.crums.util.mrkl.Tree
-
Returns the leaf width in bytes if fixed; -1, otherwise (variable).
- leavesBlock() - Method in class io.crums.util.mrkl.FixedLeafTree
-
Returns the leaves' data block.
- leftChild() - Method in class io.crums.util.mrkl.Node
-
Returns this node's left child, or
nullif this node is a leaf. - level() - Method in class io.crums.util.mrkl.index.AbstractNode
-
Returns this node's level.
- level(int) - Method in class io.crums.util.mrkl.Builder
- levelSize(int) - Method in class io.crums.util.mrkl.Builder
- lock - Variable in class io.crums.util.mrkl.Builder
-
Synchronization lock.
M
- maxIndex(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the maximum allowed index at the given
level. - maxIndexJoinsCarry(int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Determines whether there are an odd number of nodes at this
level(after accounting for the carries). - merkleRoot(ByteBuffer, int, int, List<ByteBuffer>, MessageDigest) - Static method in class io.crums.util.mrkl.Proof
-
Computes and returns the merkle root for the given item and proof-funnel.
- MIN_ALGO_WIDTH - Static variable in class io.crums.util.mrkl.FixedLeafTree
- MIN_LEAF_WIDTH - Static variable in class io.crums.util.mrkl.FixedLeafTree
N
- Navigation - Search tag in class io.crums.util.mrkl.Node
- Section
- newByteArrayList(int) - Method in class io.crums.util.mrkl.Builder
- newGeneric(int) - Static method in class io.crums.util.mrkl.index.TreeIndex
-
Creates and returns a purely structural tree index (the tree sans data, only node coordinates).
- newNode(int, int, boolean) - Method in interface io.crums.util.mrkl.index.TreeIndex.NodeFactory
-
Returns an implementation-specific node at the given coordinates.
- Node - Class in io.crums.util.mrkl
-
Merkle tree node.
O
- On Proof Funnels - Search tag in io.crums.util.mrkl.Proof.merkleRoot(ByteBuffer, int, int, List<ByteBuffer>, MessageDigest)
- Section
P
- packageTree() - Method in class io.crums.util.mrkl.Builder
- packageTree() - Method in class io.crums.util.mrkl.DeltaBuilder
- packageTree() - Method in class io.crums.util.mrkl.FixedLeafBuilder
- parent() - Method in class io.crums.util.mrkl.Node
-
Returns this node's parent, or
nullif this node is root. - proof(int) - Method in class io.crums.util.mrkl.Tree
-
Returns a cryptographic path to the root of the Merkle tree.
- Proof - Class in io.crums.util.mrkl
-
A cryptographic path from an item (expressed in bytes) to the root of a Merkle tree.
- Proof(Proof) - Constructor for class io.crums.util.mrkl.Proof
-
Copy constructor.
- Proof(Tree, int) - Constructor for class io.crums.util.mrkl.Proof
- Proof(String, int, int, byte[][]) - Constructor for class io.crums.util.mrkl.Proof
- Proof(String, int, int, byte[][], boolean) - Constructor for class io.crums.util.mrkl.Proof
R
- rightChild() - Method in class io.crums.util.mrkl.Node
-
Returns this node's right child, or
nullif this node is a leaf. - root() - Method in class io.crums.util.mrkl.Tree
-
Returns the root node of the tree.
- rootHash() - Method in class io.crums.util.mrkl.Proof
-
Returns[a copy of] the hash at the root of the Merkle tree.
- rootHeightForCount(int) - Static method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the height of the Merkle tree root node with count-many leaf elements.
S
- serialIndex() - Method in class io.crums.util.mrkl.Node
-
Returns the node's serial index.
- serialIndex(int, int) - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the serial index of the node at the given cooridinate.
- sibling() - Method in class io.crums.util.mrkl.Node
-
Returns the sibling that makes this node's parent, or
nullif this node is root.
T
- Terminology - Search tag in class io.crums.util.mrkl.index.TreeIndex
- Section
- toString() - Method in class io.crums.util.mrkl.index.AbstractNode
- toString() - Method in class io.crums.util.mrkl.index.TreeIndex
- toString() - Method in class io.crums.util.mrkl.Tree
-
For debug use.
- totalCarries() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the total number of carries (otherwise known as promoted nodes).
- totalCount() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the total number of nodes in the tree.
- totalCountSansCarries() - Method in class io.crums.util.mrkl.index.TreeIndex
-
Returns the total number of nodes in the tree excluding the carries.
- tree() - Method in class io.crums.util.mrkl.Node
-
Returns the tree this node belongs to.
- Tree - Class in io.crums.util.mrkl
-
The Merkle tree.
- Tree(int, String) - Constructor for class io.crums.util.mrkl.Tree
-
Base constructor creates an index and locks down the algo.
- Tree(Tree) - Constructor for class io.crums.util.mrkl.Tree
-
Copy constructor.
- treeDataLength(int, int, int) - Static method in class io.crums.util.mrkl.FixedLeafTree
-
Returns the number of bytes needed to encode the state of the tree, or -1 if that number exceeds the maximum
intJava allows. - TreeIndex<N> - Class in io.crums.util.mrkl.index
-
A breadth-first view of the structure of a Merkle tree.
- TreeIndex(int, TreeIndex.NodeFactory<N>) - Constructor for class io.crums.util.mrkl.index.TreeIndex
-
Creates a type-specific instance with the given factory.
- TreeIndex.NodeFactory<N> - Interface in io.crums.util.mrkl.index
-
A node factory for a
TreeIndex.
V
- verify(MessageDigest) - Method in class io.crums.util.mrkl.Node
-
Verifies the hash of this node against its children, if it has any.
- verify(MessageDigest) - Method in class io.crums.util.mrkl.Proof
-
Verifies this proof and returns the result.
All Classes and Interfaces|All Packages|Constant Field Values