public static Hash merge(Hash a,Hash b){
  try {
    MessageDigest digest=MessageDigest.getInstance("SHA-256");
    digest.update(a.bytes);
    return Hash.createFromSafeArray(digest.digest(digest.digest(b.bytes)));
  }
 catch (  NoSuchAlgorithmException e) {
    throw new RuntimeException(e);
  }
}

public static Hash merge ( Hash a , Hash b ) { try { MessageDigest digest = MessageDigest . getInstance ( "SHA-256" ) ; digest . update ( a . bytes ) ; return Hash . createFromSafeArray ( digest . digest ( digest . digest ( b . bytes ) ) ) ; } catch ( NoSuchAlgorithmException e ) { throw new RuntimeException ( e ) ; } }
merge two hashes into one for merkle tree calculation
