Calculating a MD5, SHA1, SHA256, SHA384, SHA512 Hash in C#

Following my previous post in which I showed you how to calculate a corresponding Hash in Java, here I am giving another implementation through a simple function for calculating a Hash in C#.

Look at the following code:

For making the above function work properly you will have to include the following statements in the beginning of you C# class file before declaring your namespace, like this:

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Calculating a MD5, SHA1, SHA256, SHA384, SHA512 Hash in C#, 5.0 out of 5 based on 1 rating

Leave a Reply