Hash function
To hash means to apply a hash function, which is function that takes an input and return a gibberish output, usually of a fixed length.
The idea is that it should be relatively easy to apply the hash function, but impossible to do the reverse operation. It is used in many situations. On websites and applications, for example, your passwords are hashed before being stored, and when you enter a password, it is hashed and compared to the hash. This means that if the passwords are leaked, the hacker will only access hashes of passwords, and will still need to find which entry corresponds to it.
you can see a popular hash function, SHA256, in action here: https://emn178.github.io/online-tools/sha256.html Notice that if you change one character of the input, this changes radically the output. This is an important property of hash functions
Keeping as an example the hash function SHA256, which will be the one you want almost all the time, to compute the hash function of a file, in Linux you can enter:
sha256sum [filename]
on windows it would be:
certutil -hashfile [filename] SHA256
and on MacOS:
shasum -a 256 [filename]
