TIL: How to generate checksum?


1 min read

Checksums work like a fingerprint. It is used to verify file integrity. If the files have the same checksums, then they are identical. It can also be used to check if the file has been previously scanned as malicious.

On Windows:

  1. certutil:

     certutil -hashfile <filepath> SHA256

  2. Get-FileHash

     Get-FileHash <filepath> -Algorithm SHA256

On Linux/macOS:

  1. sha256sum

     sha256sum <filepath>

  2. shasum

     shasum -a 256 <filepath>

The file hash can also be checked on VirusTotal and InQuest