using (HashAlgorithm hash = HashAlgorithm.Create()) { using (FileStream file1 = new FileStream(文件路径, FileMode.Open)) { byte[] hashByte1 = hash.ComputeHash(file1); var hashval = StringToHex.byteToHexStr(hashByte1); } }
原文:https://www.cnblogs.com/ReAiQingYi/p/14776631.html