EZPPClient-Installer/EZPPClient Installer/Utils/MD5Util.cs
2021-05-27 08:59:45 +02:00

26 lines
553 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
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();
}
}
}
}
}