What is Hash? Blockchain - 002

What is Hash? Blockchain - 002

·

2 min read

What is a Hash? A hash function is the backbone of Blockchain technology. All the blocks in Blockchain are connected via Hashes. So, What is a Hash Function?

A Hash function takes an input of any length and converts it into an output of a fixed length of 32 bytes. For e.g. if you pass ‘Codies Alert’ to SHA256 Hash Function, it will give us the 32 bytes long Hash.

’91e0ff80fcc8a58bde2d1f7ce4e22db4d0b688f406bb1155b420608954b85379‘

Another cool feature of the Hash function is that it is a deterministic function. This means, it will always produce the same Hash of given input and that’s why they are used everywhere in Blockchain from Transaction creation to validation.

Bitcoin and many other blockchains use the SHA256 Hash function. SHA256 is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001.

A hash is not ‘encryption’ – it cannot be decrypted back to the original text, it is a ‘one-way’ cryptographic function, and is a fixed size for any size of the source text. For example, you cannot get the original text ‘Codies Alert' from below Hash. ‘91e0ff80fcc8a58bde2d1f7ce4e22db4d0b688f406bb1155b420608954b85379′.

SHA256 is one of the best Hashing algorithms out there when it comes to security. Hash functions are very useful when you need to detect if there is any change. For example, Github uses the Hash function to determine if anything has changed in a file.

If hope got an understanding of what is a Hash function. Share this article with your friends if you think it will be useful to them.

I hope this article and video gave you some insights into Blockchain technology. If you have liked this article then do not forget to share it with your friends and connect with me on Twitter for quick updates on Blockchain and Web3 Technology. I am preparing an advanced Blockchain course which will be out soon.

Course Page.png

If you have not checked my Beginners Blockchain Guide course, I recommend you to check it now. It is FREE and you will also get your certificate of completion. I wish you all the best in your Blockchain Journey.