This seems to be a little different than what you are attempting, but I have done something similar when transferring large files across the wire.
First I build a manifest file, which is a list of each chunk of the file to be sent, it's order, and it's md5 hash. I send that file across to the receiving process.
Then I start sending chunks of file, the receiver, gets them, validates their hash, and queues them up to be reassembled. If a chunk doesn't match it's hash, it is discarded, and a request is made for that chunk to be passed again.
Once all the chunks are received and validated, the file is reassembled, and the complete file is checked against the complete file hash in the manifest. If everything looks good, we send a successful response back to the sender.
This lets me deal with, and validate just pieces of a file at a time, but it does not let me build a hash from the hash values of smaller sources. This I don't believe is possible, just by the nature of the hashing algorithms.
Edit
And +1 for @ken2k's comment on your question. md5.TransformBlock()
and md5.TransformFinalBlock()
are probably exactly what you are looking for. I had no idea such a thing existed.