Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
quux00 committed Jun 7, 2015
1 parent 00f37a9 commit 34ebaf7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ It is useful to be able to distinguish leaf from internal nodes (especially when

So my `MerkleTree.Node` class is:

static class Node {
public byte type; // INTERNAL_SIG_TYPE or LEAF_SIG_TYPE
public byte[] sig; // signature of the node
public Node left;
public Node right;
}
```java
static class Node {
public byte type; // INTERNAL_SIG_TYPE or LEAF_SIG_TYPE
public byte[] sig; // signature of the node
public Node left;
public Node right;
}
```


## Hash/Digest Algorithm
Expand Down Expand Up @@ -102,10 +104,9 @@ By including the `siglength` field, I can allow leaf nodes signatures to be "pro

For the use case described above, you can imagine that system A does the following:


```java
List<String> eventSigs = new ArrayList<>();

```java
while (true) {
Event event = receiveEvent();
String hash = computeHash(event);
Expand Down

0 comments on commit 34ebaf7

Please sign in to comment.