一、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