teach-ict.com logo

THE education site for computer science and ICT

Hashing

Hashing is a mathematical method of converting data into a unique number. For example 'teach-ict.com' could be hashed into the number 122344453 (for example).

Hashing is mainly used in two areas
1. Security
2. Database

Security: Say you want to send an electronic message to someone and you want to make sure that it has not been tampered with. You would pass the message through a 'hash algorithm' to produce a unique number. Then you would send both the message and the hash.
The receiver would then do the same calculation on the message and then compare the new hash with the one received. If any tampering has gone on, then the two hashes would be different.

Database: Each record in a table can be used to make a hash table, sometimes called an index.

For example the record 'John Smith' has a hash of 1223444 (for example). If you want to find the John Smith record, the system would work out its location from the index, or 'hash table'. This is far quicker than searching through every record for a match.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Hashing

2020-10