2018年8月9日 星期四

Built-in checksum utility on Windows 7

Source : https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7/898377#898377

CertUtil is a pre-installed Windows utility that can be used to generate hash checksums:
certUtil -hashfile pathToFileToCheck [HashAlgorithm]
HashAlgorithm choices: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
So for example, the following generates an MD5 checksum for the file C:\TEMP\MyDataFile.img:
  CertUtil -hashfile C:\TEMP\MyDataFile.img MD5
To get output similar to *Nix systems you can add some PowerShell magic:
$(CertUtil -hashfile C:\TEMP\MyDataFile.img MD5)[1] -replace " ",""

沒有留言: