Using hashes to check data integrity
Hash the file before and after transfer. If both hashes (checksums) match, the data is unchanged. A different hash shows the file was altered or tampered with, so its integrity is lost.
Understanding Using hashes to check data integrity in VCE Data Analytics U4O2
What it does: Running a hashing function over the file produces the checksum the receiver compares against. The comparison of the new hash with the original hash is how the receiver checks that the data is unchanged. Matching hashes show the data has not changed. A hash does not encrypt anything. A checksum is a hash of the file's data. It is used to detect changes, not to control access. A good hash function gives a very different output for even a small change, which makes tampering detectable. A mismatch means the integrity of the file is lost, so the data should not be relied on for decisions until a verified copy is obtained.
Common mistakes: The hash after transfer must be calculated from the received copy of the file, not from the earlier hash. It should be after ← HASH(copy). Both hashes must use the same algorithm. A different algorithm gives a different value even for an identical file. It should be got ← SHA256(download).
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 44–79) and word search (Modules 44–113).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
hash comparisonFill in the Blanks
Spot the Error
Student with a class code? Join your class →