code: protected final DataHash hash(byte[] hash1, byte[] hash2, long level, HashAlgorithm algorithm) throws InvalidAggregationHashChainException {
          if (!algorithm.isImplemented()) {
              throw new InvalidAggregationHashChainException("Invalid aggregation hash chain. Hash algorithm " + algorithm.getName() + " is not implemented");
          }
          DataHasher hasher = new DataHasher(algorithm, false);
          hasher.addData(hash1);
          hasher.addData(hash2);
          hasher.addData(Util.encodeUnsignedLong(level));
          return hasher.getHash();
      }
docs: Hash two hashes together.
  
  @param hash1     first hash
  @param hash2     second hash
  @param level     level
  @param algorithm hash algorithm to use
  @return instance of {@link DataHash}