- We'll use a test file for this example:
testfile.txt
Some interesting stuff is going on here..
- Specify the
/path/to/file
using the-f
flag for the generator
cargo run -- -f testfile.txt
ChkCmp - Checksum Generator
----------------------------
File: testfile.txt, Size: 42 Bytes
Generating..
Checksums
----------
SHA-256: 2119538df04df684e20756217baaf2e8501c837d6814912d5d862087d6e71972
SHA-512: 182b1e492b65fd0215d59c644eb05beb8aef39d4eb9f40803eaf84e138edad010338856b9d580ed229bc856836ced68fbe9f2066e5a4b9dc154f7d2e41d9528c
Enter expected checksum to compare (Leave empty to skip): 338b866c81e0556ca36c48e617f3aee4e72beec52119ba3a5e2d5e432a482a28 # <-- Trigger a fail
[✘] Integrity could not be verified: 2119538df04df684e20756217baaf2e8501c837d6814912d5d862087d6e7197e
Enter expected checksum to compare (Leave empty to skip): 2119538df04df684e20756217baaf2e8501c837d6814912d5d862087d6e71972
[✔] Integrity verified: 2119538df04df684e20756217baaf2e8501c837d6814912d5d862087d6e71972
Save the results? (Leave empty to skip) [y]: y
==> Output saved to testfile_chkcmp.txt
Duration: 18.70s
Finished