LSLEditor/BZip2Decompress/MD5Verify.cs
dimentox 7d308772cf Initial import
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@1 3f4676ac-adda-40fd-8265-58d1435b1672
2010-04-29 03:23:31 +00:00

18 lines
449 B
C#

using System;
using System.Security.Cryptography;
using System.IO;
namespace LSLEditor.BZip2Decompress
{
class MD5Verify
{
public static string ComputeHash(string strFile)
{
MD5CryptoServiceProvider csp = new MD5CryptoServiceProvider();
FileStream stream = File.OpenRead(strFile);
byte[] hash = csp.ComputeHash(stream);
stream.Close();
return BitConverter.ToString(hash).Replace("-", "").ToLower();
}
}
}