Compute a hash without storing the entire buffer in memory at the same time

I perform an operation when I get a few bytes from a component, do some processing, and then send it to the next component. I need to be able to calculate the hash of all the data that I saw at any given time, and because of the size of the data; I cannot store all this in a local buffer.

How would you calculate the hash (MD5) in the circumstances?

I think I should be able to hold onto the intermediate hash result and add more data as I go. But does any of the built-in infrastructure classes support it?

+5
source share
2 answers

TransformBlock TransformFinalBlock, .

MSDN , .

+7

, .

MD5CryptoServiceProvider - ComputeHash(), ?

0

All Articles