0
public static string Md5(string strChange)
{
//Declarations
Byte[] originalBytes;
Byte[] encodedBytes;
MD5 md5;
md5 = new MD5CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(strChange);
encodedBytes = md5.ComputeHash(originalBytes);
//Convert encoded bytes back to a 'readable' string
string result = BitConverter.ToString(encodedBytes);
return result;
}
Posted on 2:42 AM by Softminer and filed under
C#
public static string Md5(string strChange)
{
//Declarations
Byte[] originalBytes;
Byte[] encodedBytes;
MD5 md5;
md5 = new MD5CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(strChange);
encodedBytes = md5.ComputeHash(originalBytes);
//Convert encoded bytes back to a 'readable' string
string result = BitConverter.ToString(encodedBytes);
return result;
}
Post a Comment