You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-->`let tree = new MerkleTree([1]); expect(tree.root).toBe('6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b');`
19
+
-->let tree = new MerkleTree([1]); expect(tree.root).toBe('6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b');
19
20
20
21
## Calculate a Merkle Root from a directory of files recursively
21
22
- First set or export environment variable `ASSET_DIRECTORY_PATH` to the directory you want to process.
22
23
- Then run:
23
-
->`npm run process`
24
+
->npm run process
24
25
- Digests and calculates a Merkle Root for the entire specified directory and contents
25
26
26
-
###Test
27
+
## Test
27
28
- Execute tests with:
28
-
->`npm run test`
29
+
->npm run test
29
30
- Runs a variety of tests proving that the MerkleTree class correctly calculates the merkle root for a set of data
30
31
31
32
## Merkle Tree Info.
32
33
In cryptography and computer science, a hash tree or Merkle tree is a tree in which every "leaf" (node) is labelled with the cryptographic hash of a data block, and every node that is not a leaf (called a branch, inner node, or inode) is labelled with the cryptographic hash of the labels of its child nodes. A hash tree allows efficient and secure verification of the contents of a large data structure. A hash tree is a generalization of a hash list and a hash chain.
33
34
- Read more at https://en.wikipedia.org/wiki/Merkle_tree
34
35
35
36
## Available Hash Algorithms
36
-
>'RSA-MD4',
37
+
`'RSA-MD4',
37
38
'RSA-MD5',
38
39
'RSA-MDC2',
39
40
'RSA-RIPEMD160',
@@ -91,4 +92,4 @@ In cryptography and computer science, a hash tree or Merkle tree is a tree in wh
0 commit comments