mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
19
Assets/GameScripts/DotNet/Core/Helper/MD5Helper.cs
Normal file
19
Assets/GameScripts/DotNet/Core/Helper/MD5Helper.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user