using (HashAlgorithm hash = HashAlgorithm.Create()) { using (FileStream file1 = new FileStream(文件路径, FileMode.Open)) { byte[] hashByte1 = hash.ComputeHash(file1); var hashval = StringToHex.byteToHexStr(hashByte1); } }
2022-03-09 01:44:41
using (HashAlgorithm hash = HashAlgorithm.Create()) { using (FileStream file1 = new FileStream(文件路径, FileMode.Open)) { byte[] hashByte1 = hash.ComputeHash(file1); var hashval = StringToHex.byteToHexStr(hashByte1); } }