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:

1 Comment

 Add your comment
  1. Awesome article very use full to me.Thank you very much sagar.

Leave a Reply

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