I have a use case similar to that described in this article: Calculate MD5 checksum for a file
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 System.String documentation. They say the following about the GetHashCode() function:
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.
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?