Hash Function is a function which has a huge role in making a System Secure as it converts normal data given to it as an irregular value of fixed length. We can imagine it to be a Shaker in our homes.
When we put data into this function it outputs an irregular value. The Irregular value it outputs is known as “Hash Value”.Hash Values are simply number but are often written in Hexadecimal. Computers manage values as Binary. Hash value is also a data and are often managed in Binary.

Hash function is basically performing some calculations in the computer.Data values that are its output is of fixed length. Length always varies according to the hash function. Value doesn’t vary even if there is a large or small value.

If given same input, two hash functions will invariable produce the same output.Even if input data entered differs by a single bit, huge change in their output values.Even if input data entered differs huge, there is a very very minimal chance that the hash values produced will be identical. If they are equal it is known as “Hash Collision”.

Converting Hash Codes to its original value is impossible task to perform.This is Main difference between Encryption as Hash Function.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- How Security System Should Evolve to Handle Cyber Security Threats and Vulnerabilities?
- Difference between Cyber Security and Information Security
- Difference between Network Security and Cyber Security
- Difference between Information Security and Network Security
- System Security
- Principal of Information System Security : History
- Principle of Information System Security
- Cyber System Security
- Passwords and Cryptographic hash function
- MD5 hash in Python
- MD5 hash in Java
- SHA-512 Hash In Java
- SHA-384 Hash In Java
- SHA-224 Hash In Java
- SHA-1 Hash
- MD2 Hash In Java
- SHA-256 Hash in Java
- Blockchain Hash Function
- What is HMAC(Hash based Message Authentication Code)?
- Full domain Hashing with variable Hash size in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

