Generate an MD5 hash of the file evidence.txt
openssl dgst -md5 evidence.txt
Generate a SHA-1 hash of the same file
openssl dgst -sha1 evidence.txt
Generate a SHA-256 hash of the file
openssl dgst -sha256 evidence.txt
Compare the hash of evidence.txt with tampered.txt to detect tampering
openssl dgst -sha256 tampered.txt
Use sha256sum to verify file integrity
sha256sum evidence.txt
Demonstrate MD5 collision vulnerability by hashing collision1.bin and collision2.bin
openssl dgst -md5 collision1.binopenssl dgst -md5 collision2.bin