Understanding file hashes and checksums for verifying file integrity.
A file hash (or checksum) is a unique string of characters generated by running a file through a cryptographic hash function. It acts as a "digital fingerprint" for the file - any change to the file, no matter how small, will produce a completely different hash.
Key Properties:
Example: d41d8cd98f00b204e9800998ecf8427e
Warning: Do not use for security purposes!
Example: da39a3ee5e6b4b0d3255bfef95601890afd80709
Note: Being phased out for security uses
Example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Recommended: Industry standard for file verification
Example: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce...
Maximum Security: Best for high-value files
Get-FileHash -Algorithm SHA256 filename.zip
shasum -a 256 filename.zip
sha256sum filename.zip
md5sum filename.zip
certutil -hashfile filename.zip SHA256
Verify that downloaded software hasn't been tampered with by comparing the hash with the one provided by the official source.
Check if files were corrupted during transfer or storage by comparing hashes before and after.
Identify duplicate files by comparing their hashes - identical hashes mean identical files.
Ensure backups and copies are exact matches of the original files using hash comparison.