@Test public void testFromData() throws Exception { byte[] cipherText = HexUtils.toBytes("5edbaade9ba4ed528a8de36c95ece996189dedf4756fba2599f94b4f370d7013" + "66e2f0ba4e59111c0787708cf4b0b82de558b4d8bf5d90b3512f09814d605d4c" + "14f2f85b596211f83918c31c4bef19ea"); MerkleTree merkleTree = MerkleTree.fromData(cipherText); assertEquals("Merkle root", "9e913cd60f7df551b3baa320602bfba78489921d661362a64a03550a45add008", merkleTree.getRoot().toHex()); }
public static MerkleTree fromData(byte[] data){ return fromData(data, DEFAULT_CHUNK_SIZE); }
MerkleTree { public static MerkleTree fromData(byte[] data){ return fromData(data, DEFAULT_CHUNK_SIZE); } }
MerkleTree { public static MerkleTree fromData(byte[] data){ return fromData(data, DEFAULT_CHUNK_SIZE); } MerkleTree(Sha256Hash root, ArrayList<byte[]> chunks); }
MerkleTree { public static MerkleTree fromData(byte[] data){ return fromData(data, DEFAULT_CHUNK_SIZE); } MerkleTree(Sha256Hash root, ArrayList<byte[]> chunks); static MerkleTree fromData(byte[] data); static MerkleTree fromData(byte[] data, int chunkSize); Sha256Hash getRoot(); ArrayList<byte[]> getChunks(); @Override boolean equals(Object o); @Override int hashCode(); }
MerkleTree { public static MerkleTree fromData(byte[] data){ return fromData(data, DEFAULT_CHUNK_SIZE); } MerkleTree(Sha256Hash root, ArrayList<byte[]> chunks); static MerkleTree fromData(byte[] data); static MerkleTree fromData(byte[] data, int chunkSize); Sha256Hash getRoot(); ArrayList<byte[]> getChunks(); @Override boolean equals(Object o); @Override int hashCode(); static final int DEFAULT_CHUNK_SIZE; }