Terminal/Command-line/PowerShell计算Hash值

Terminal/Command-line/PowerShell计算Hash值


Terminal

1
2
3
4
5
6
7
8
#MD5
md5 /path/to/file

#SHA1
shasum -a 1 /path/to/file

#SHA256
shasum -a 256 /path/to/file

Command Line

1
2
3
certutil -hashfile FILENAME MD5
certutil -hashfile FILENAME SHA1
certutil -hashfile FILENAME SHA256

PowerShell

1
Get-FileHash -Path PATH\TO\FILENAME -Algorithm SHA512

参考链接