编辑
2023-12-20
软件编程
0
c#
static private string GET_File_MD5(string path) { try { byte[] buffer = File.ReadAllBytes(path); ; System.Security.Cryptography.MD5 file1_md5 = MD5.Create(); byte[] retval = file1_md5.ComputeHash(buffer); StringBuilder sb = new StringBuilder(); for (int i = 0; i < retval.Length; i++) { sb.Append(retval[i].ToString("X2")); } return sb.ToString(); } catch (Exception ep) { Console.WriteLine(ep.Message); return ""; } }

本文作者:Kellermen

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!