Calculate Hash in .NET

Posted by Joe Enos on February 17, 2021 · 1 min read

With .NET, you can calculate a file hash, or the hash of any stream, using the HashAlgorithm.ComputeHash method.

Here's a sample application showing how to choose one of four algorithms and formats. To see how the SendTo functionality works, check out the previous video.

View code on GitHub