02 File Hashing Overview

Topic Progress:

What is a file hash?

A number or string generated using an algorithm that is run on text or data. The premise is that it should be unique to the text or data. If the file or text changes in any way, the hash will change.

What is it used for?

  1. File and data identification
  2. Password/certificate storage comparison

For example, here “password” is hashed with different types of hashing algorithms:

SHA­1: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8

SHA­2: 5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8

MD5: 5F4DCC3B5AA765D61D8327DEB882CF99

CRC32: BBEDA74F

How can we determine the hash of a file? You can use the md5sum command (or similar).

$md5sum samplefile.txt
3b85ec9ab2984b91070128be6aae25eb samplefile.txt