title: caluclate MD5 of uploaded image
body: <p>I have the following Method that gets the posted files. </p>
  
  <p>What is the best approach to calculate the <code>MD5</code> hash and where ? </p>
  
  <pre><code>    public void ProcessRequest(HttpContext context)
      {
          if (context.Request.Files.Count &gt; 0)
          {
              HttpFileCollection files = context.Request.Files;
              for (int i = 0; i &lt; files.Count; i++)
              {
                  HttpPostedFile file = files[i];
                  string fileName = context.Server.MapPath("~/uploads/" + file.FileName);
                  file.SaveAs(fileName);
                  int Size = file.ContentLength;
              }
  
          }
      }
  </code></pre>