在Windows中可以通过以下方式:
certutil -hashfile yourfilename MD5 certutil -hashfile yourfilename SHA1 certutil -hashfile yourfilename SHA256
而在Linux下,命令为:
md5sum yourfilename
sha1sum yourfilename
sha256sum yourfilename
实例:
可以看到,对于相同的文件,在Windows下和Linux下采用相同的算法,获取到的Hash值是一致的。
在Windows环境下与Linux环境下快速计算文件Hash
原文:https://www.cnblogs.com/bruceChan0018/p/14939002.html