title: SHA-1 Hash of uploaded xls file always different, With csv file hashing works
body: <p>I got the following problem. I upload csv and excel files via WCF Service. Hash calculation does only work for csv files. With xls files i get a different value with every upload.</p>
  
  <p>Hash Calculation:</p>
  
  <pre><code>            using (FileStream file = new FileStream(datei.FullName, FileMode.Open))
              {
                  var sha1 = new SHA1CryptoServiceProvider();
                  byte[] retVal = sha1.ComputeHash(file);
                  var sb = new StringBuilder();
                  foreach (var b in retVal)
                      sb.Append(b.ToString("x2"));
  
                  return sb.ToString();
              }
  </code></pre>
  
  <p>Does anybody know where the problem might be located? Is it a problem with the binary xls file format?</p>
  
  <p>Any help is deeply appreciated.</p>
  
  <p>Marius</p>