Ch5: Something on Hash

Ch5: Something on Hash

Hash is a function that takes an input string of any length and generates a unique output of a fixed length. SHA256 algorithm is used in bitcoin. SHA256 output is a hexadecimal value of 64 characters with a size of 256 bits (or 32 bytes). It's common to hear 'hashing' or 'hash function' from blockchain articles. They're saying the same thing. Hash has nothing to do with social media ‘hashtag’. A hash is not an encryption, because it cannot be decrypted back to the original text. It's a cryptographic one-way function. Below is an example of a hash function. Sometimes, the output is referred to as hashed text, hash sum/value, digital digest or digest.

No alt text provided for this image


You can go online to https://emn178.github.io/online-tools/sha256.html where you can type in any text and get a unique SHA256 output of 64 characters.

For example, when I type in Hello!’, I receive:

ce06092fb948d9ffac7d1a376e404b26b7575bcc11ee05a4615fef4fec3a308b

If I change one character and type in ‘Hello.’, I receive:

1589999b0ca6ef8814283026a9f166d51c70a910671c3d44049755f07f2eb910

Notice that changing a single character will generate a different output.


Double hash is often used in Bitcoin, where one input is hash two times. Later, we'll see how hash plays an important role in blockchain.

No alt text provided for this image


Remember

·      Hash output is always unique.




要查看或添加评论,请登录

Dr. AC Khor的更多文章

  • Battery Management System BMS

    Battery Management System BMS

    Recall that Battery pack (电池组/电池包) is made up of several modules (电池模块). Modules is made up of several cells (电池).

  • Battery for Electric Vehicle

    Battery for Electric Vehicle

    There are 3 types of chemical batteries: primary (non-rechargeable), secondary (rechargeable), fuel cell. The primary…

  • Battery Junction Box BJB

    Battery Junction Box BJB

    Battery Electric Vehicle's Battery Junction Box (BJB) has many other names: Recall that Battery Junction Box (BJB) is…

  • On-Board Charger OBC

    On-Board Charger OBC

    Recall that On-Board Charger (OBC) of a Battery Electric Vehicle (BEV) converts AC to DC. There are two types of OBC:…

  • Charging Electric Vehicle

    Charging Electric Vehicle

    Chargeable electric vehicle (EV) is known as PEV (Plug-in Electric Vehicle), which includes BEV (Battery Electric…

  • Battery Electric Vehicle (BEV)

    Battery Electric Vehicle (BEV)

    There are different types of electric vehicles, as shown in the diagram below. This article will focus on Battery…

  • Ch1: Who coined it?

    Ch1: Who coined it?

    The term ‘blockchain’ has become so widespread these days, yet many people may not know the origins of this word. A web…

  • Ch2: What is blockchain?

    Ch2: What is blockchain?

    A blockchain is a chain of blocks filled with data. The data may be in the form of currency transactions (eg: bitcoin…

  • Ch3: Something on Block

    Ch3: Something on Block

    We know there's data in a blockchain block. Aside from the data, it also contains a magic number, block size, block…

  • Ch4: Something on Node

    Ch4: Something on Node

    A node is a computer connected to a blockchain network. The blockchain network is therefore made up of many nodes.

社区洞察

其他会员也浏览了