# What is a hash in a blockchain?

Megha

Last Update vor 3 Jahren

In the blockchain, hashing refers to the technique of having an input item of any length mirror an output item of a defined length. In the case of blockchain applications in cryptocurrencies, transactions of variable lengths are processed by a certain hashing algorithm, and all produce an output of a fixed length. This is true regardless of how long the input transaction is. The result is referred to as a hash. Bitcoin's Secure Hashing Algorithm 256 is a nice example (commonly shortened to SHA-256). Hashing with SHA-256 always yields an output result of a defined length, which is 256 bits (the output is 32 bytes).

For example, if you hash a 50-megabyte YouTube video with SHA-256, the result is a 256-bit hash. Similarly, if you take a 5-kilobyte text message, the output hash will still be 256 bits. The hash pattern will be the only difference between the two. Let us summarise the preceding information: The term "hashing" refers to cryptographic hash functions as a whole.