在Windows中可以通过以下方式:

certutil -hashfile yourfilename MD5
certutil -hashfile yourfilename SHA1
certutil -hashfile yourfilename SHA256

  而在Linux下,命令为:

md5sum yourfilename
sha1sum yourfilename
sha256sum yourfilename

  实例:

  可以看到,对于相同的文件,在Windows下和Linux下采用相同的算法,获取到的Hash值是一致的。

 

posted on 2021-06-26 20:35  长江同学  阅读(351)  评论(0编辑  收藏  举报