title: How to calculate an md5 from chunks of data as they are being read
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2124468/possible-to-calculate-md5-or-other-hash-with-buffered-reads">Possible to calculate MD5 (or other) hash with buffered reads?</a>  </p>
  </blockquote>
  
  
  
  <p>I am performing an md5 checksum on the entire raw contents of a usb flash drive.</p>
  
  <p>I am reading the drive in 1 MB chunks.  Obviously I am not keeping the buffer around for very long as I would run out of memory very quickly.</p>
  
  <p>I would like to send the 1 MB chunk to the md5 algorithm as they are read and when I'm done reading get the final value of the md5.</p>
  
  <p>Is there any C# code that can easily accomplish this?</p>