21 lines
450 B
C#
21 lines
450 B
C#
using System;
|
|
using System.IO;
|
|
using System.Security.Cryptography;
|
|
namespace EZPPClient_Installer
|
|
{
|
|
class MD5Util
|
|
{
|
|
public static string CalculateMD5(string filename)
|
|
{
|
|
using (var md5 = MD5.Create())
|
|
{
|
|
using (var stream = File.OpenRead(filename))
|
|
{
|
|
var hash = md5.ComputeHash(stream);
|
|
return BitConverter.ToString(hash).Replace("-", "").ToUpperInvariant();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|