I have a method that hash input string to generate MD5 pass from it
can I test his input an output without debugging
private string getMD5hash(string input)
{
//create a new instance of MD5 object
MD5 md5Hasher = MD5.Create();
//convert the input value to byte array
byte[] data = md5Hasher.ComputeHash(Encoding.Default.GetBytes(input));
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < data.Length ; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}
I am using Visual Studio 2010
The fastest and easiest way I can think of, off the top of my head, would be to create a Console Application in Visual Studio, and place the function in the main class.
Then in the
mainfunction call the above function with appropriate output, something like