Welcome to Blockchain Demo!
Lab 1: HASHES
Before we begin, let's re-reference what a hash is. The hash (in regard to Ethereum) is an output of a SHA-256 function. Hashed outputs are a fixed length, even though they take data input of any arbitrary length. We also call this output our “fingerprint” for the data.
Let’s see how a minor change in the data changes not only the meaning of the sentence, but It also changes our hash:
Step 1: TYPE THE FOLLOWING INTO THE DATA FIELD, VERBATIM:
Most of the time, travelers worry about their luggage.
Your hash output should be the following 64 characters:
Step 2: Delete the comma after the word “time”
Not only does the meaning of the sentence change but the Hash output also changes. Your hash output should now be 64 characters (same length) but the following different characters:
In the first example we saw how a minor change to the data has a subsequent change in the hash. Now, let's see how the amount of data we input does NOT change the number of characters in the hash.
Step 1: COPY AND PASTE THE FOLLOWING STORY INTO THE DATA FIELD:
As a man was passing the elephants, he suddenly stopped, confused by the fact that these huge creatures were being held by only a small rope tied to their front leg. No chains, no cages. It was obvious that the elephants could, at anytime, break away from their bonds but for some reason, they did not. He saw a trainer nearby and asked why these animals just stood there and made no attempt to get away. “Well,” trainer said, “when they are very young and much smaller we use the same size rope to tie them and, at that age, it’s enough to hold them. As they grow up, they are conditioned to believe they cannot break away. They believe the rope can still hold them, so they never try to break free.” The man was amazed. These animals could at any time break free from their bonds but because they believed they couldn’t, they were stuck right where they were.
Your hash should be the following:
*Note: It must be copied exactly like the passage above, no extra lines or characters.
Your hash length once again should be 64 characters long.