Next to Ethan White's answer, I want to add that you could use the Merkle-Demgrad by performing a length extension attack. To do so, let's define the hash function $H$ as $H(x) = C(P(x))$ where $C$ is the compression function and $P$ is the padding function. The way $C$ works within a Merkle-Demgrad construction is splitting the input into blocks $B$ and then applying $S = M(B_i, S)$ where $S$ is the state of the compression function and $M$ mixes the current block and the state in some magic way. The most hash functions, like SHA-256 or SHA-512, directly return $S$ which can be abused for extending the hash:
Length extension attacks try to build the hash of $P(X) || Y$ only using $H(X)$ and information needed to recreate the padding of $P(X)||Y$ which often is the length of $P(X)$. The first step to extend the hash is to pad $Y$ so it can be applied to the compression function. Since the most padding functions rely on the message's length, you have to take care of that by assuming the length of the message is the length of $P(X)$ plus the length $Y$. Once $Y$ is padded correctly, we set $S$ to $H(X)$ and then continue to apply $C$ to the forged padding of $Y$ as it would be usual input. That way, we created $H(P(X) || Y) = C(P(X) || Y)$ which equals to $C(FP(Y))$ when $FP$ is the forged padding and $S = H(X)$.
In practise, I would use SHA-256, which can be attacked that way, and store it with the information about the length of each part which is included into the hash so you can reconstruct the input into the compression function later for validating data.
EDIT: Unlike in Ethan White's answer, the order does matter when applying this method, but a length extension should be ways faster since no powMod is involed.