Files
TEngine/Assets/GameScripts/DotNet/Core/Helper/MD5Helper.cs
ALEXTANG 336d4b2eb9 [+] 接入ET8服务端
[+] 接入ET8服务端
2023-07-13 12:23:48 +08:00

20 lines
385 B
C#

using System.IO;
using System.Security.Cryptography;
namespace ET
{
public static class MD5Helper
{
public static string FileMD5(string filePath)
{
byte[] retVal;
using (FileStream file = new FileStream(filePath, FileMode.Open))
{
MD5 md5 = MD5.Create();
retVal = md5.ComputeHash(file);
}
return retVal.ToHex("x2");
}
}
}