using System . Security . Cryptography;
MD5 vMD5 = MD5 . Create();
byte [] vBuffer = Encoding . Default . GetBytes( "Zswang" );
Text = BitConverter . ToString(vMD5 . ComputeHash(vBuffer));
// or
MD5 vMD5 = MD5 . Create();
FileStream vFileStream = new FileStream ( @"c:\temp\temp.txt" ,
FileMode . Open, FileAccess . Read);
Text = BitConverter . ToString(vMD5 . ComputeHash(vFileStream));
vFileStream . Close();