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:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Trackback