title: What parts of a file does SHA256 use to compute a hash
body: <p>I am working on transferring files over the network.  There is zero tolerance for data loss during the transfers.  I've been asked to compute the SHA256 values for the original and the copied file to verify the contents are the same.  So far I have made comparisons based on copying and pasting the file, and letting Windows rename the file with the -copy appended to the filename.  I have also tried renaming the file after the rename above, as well as removing the file extension.  So far they all produce the same hash. I've also coded altering file attributes (just changed lastWrittenTime and fileCreationTime) and this does not seem to have an effect on the hash.</p>
  
  <pre><code>Checksum result of copying and pasting a file(explorer appends "-copy to name):
  
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  
  Checksum result of renaming the -copy in explorer:
  
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  
  Checksum result of changing file extension:
  
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  E7273D248F191A0F914837A21BE39D229D790CA242D38651BAA06DAC9EBB63F7
  </code></pre>
  
  <p>What part/s of the file are used when the hash is created?</p>
  
  <p>Ok, zero tolerance was a bit much, if the hash doesn't match the file will have to be resent.</p>