title: Is an MD5 hash deterministic in .NET core?
body: <p>I have a use case similar to that described in this article:
  <a href="https://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file">Calculate MD5 checksum for a file</a></p>
  
  <p>Since the article apparently refers to .NET Framework and I use .NET core, I wanted to find out more about hashes in .NET core.
  After a little research about I came across a statement in Microsoft's <a href="https://docs.microsoft.com/en-us/dotnet/api/system.string.gethashcode?view=netcore-3.0" rel="nofollow noreferrer">System.String documentation</a>. They say the following about the <em>GetHashCode()</em> function:</p>
  
  <blockquote>
    <p>The hash code itself is not guaranteed to be stable. Hash codes for
    identical strings can differ across .NET implementations, across .NET
    versions, and across .NET platforms (such as 32-bit and 64-bit) for a
    single version of .NET. In some cases, they can even differ by
    application domain. This implies that two subsequent runs of the same
    program may return different hash codes.</p>
  </blockquote>
  
  <p>Since I am not very familiar with hashes and the behavior occurs only in .NET core, the above statement worried me. Can an MD5 hash be used to store a checksum in the database and is this checksum calculated the same on every platform?
  Or is it like GetHashCode() and the result can be different on different platforms or even with each program execution?</p>