A C# Overloaded Method to Calculate an MD5 Hash

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: C#

More information:
This snippet calculates the MD5 has of a given string and optionally accepts the encoding type to use. The method is overloaded so you only have to pass in a string to hash, and the system encoding default is used instead.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: