Package ch.bitagent.bitcoin.lib.helper
Class Merkle
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.helper.Merkle
-
public class Merkle extends Object
Merkle class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]merkleParent(byte[] hash0, byte[] hash1)Takes the binary hashes and calculates the hash256static List<byte[]>merkleParentLevel(List<byte[]> hashes)Takes a list of binary hashes and returns a list that's half the lengthstatic byte[]merkleRoot(List<byte[]> hashes)Takes a list of binary hashes and returns the merkle root
-
-
-
Method Detail
-
merkleParent
public static byte[] merkleParent(byte[] hash0, byte[] hash1)Takes the binary hashes and calculates the hash256- Parameters:
hash0- an array ofbyteobjectshash1- an array ofbyteobjects- Returns:
- an array of
byteobjects
-
merkleParentLevel
public static List<byte[]> merkleParentLevel(List<byte[]> hashes)
Takes a list of binary hashes and returns a list that's half the length
-
-