zl程序教程

您现在的位置是:首页 >  其他

当前栏目

014-操作系统下验证下载文件的 MD5/SHA1/SHA256

文件下载操作系统 验证 MD5 SHA1 014 sha256
2023-09-14 09:08:46 时间

一、mac

1、md5

  openssl md5 /path/to/file

  新的macOS默认支持:md5 filename

2、sha256

  openssl dgst -sha256 /path/to/file

3、sha1

  openssl sha1 /path/to/file

4、别名设置

  不妨在 .bashrc  或者 / .zshrc 里加入一行alias sha256="openssl dgst -sha256"来实现通过sha256 /path/to/file校验 SHA256

二、Window命令如下

certutil -hashfile filename MD5

certutil -hashfile filename SHA1

certutil -hashfile filename SHA256